<form method="POST" action="{{ route('admin.ip-pools.update', $pool) }}">
    @csrf @method('PUT')
    <div class="row g-3">
        <div class="col-md-6">
            <label class="form-label">{{ __('admin/ip_pools.field_quarantine_days') }}</label>
            <input type="number" name="quarantine_days" min="0" max="365"
                   class="form-control @error('quarantine_days') is-invalid @enderror"
                   value="{{ old('quarantine_days', $pool->quarantine_days) }}">
            @error('quarantine_days')<div class="invalid-feedback">{{ $message }}</div>@enderror
        </div>
        <div class="col-md-6">
            <label class="form-label">{{ __('admin/ip_pools.field_allocator') }}</label>
            <select name="allocator" class="form-select @error('allocator') is-invalid @enderror">
                <option value="sequential" @selected(old('allocator', $pool->allocator) === 'sequential')>{{ __('admin/ip_pools.allocator_sequential') }}</option>
                <option value="random" @selected(old('allocator', $pool->allocator) === 'random')>{{ __('admin/ip_pools.allocator_random') }}</option>
            </select>
            @error('allocator')<div class="invalid-feedback">{{ $message }}</div>@enderror
        </div>
        <div class="col-12">
            <label class="form-label">{{ __('admin/ip_pools.field_notes') }}</label>
            <textarea name="notes" rows="3"
                      class="form-control @error('notes') is-invalid @enderror">{{ old('notes', $pool->notes) }}</textarea>
            @error('notes')<div class="invalid-feedback">{{ $message }}</div>@enderror
        </div>
        <input type="hidden" name="name" value="{{ $pool->name }}">
        <input type="hidden" name="server_id" value="{{ $pool->server_id }}">
        <input type="hidden" name="cidr" value="{{ $pool->cidr }}">
        <input type="hidden" name="gateway" value="{{ $pool->gateway }}">
        <input type="hidden" name="is_default" value="{{ $pool->is_default ? 1 : 0 }}">
        <input type="hidden" name="is_active" value="{{ $pool->is_active ? 1 : 0 }}">
    </div>
    <div class="mt-3">
        <button type="submit" class="btn btn-primary">{{ __('admin/common.save') }}</button>
    </div>
</form>
