<style>
    .add_btn {
        height: 30px; width: 30px; border-radius: 100%; padding: 0
    }
</style>
<form class="row g-3 auto-width" method="post" action="{{ route('operations.store') }}">
    @csrf
    @method('post')
    <div class="col-md-12">
        <label for="operation" class="form-label">Name<span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" name="operation" aria-describedby="inputGroupPrepend" placeholder="Name">
        <span class="text-danger error_operation_name" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="type" class="form-label">Category<span class="text-danger"><b>*</b></span></label>
        <div class="input-group mb-3">
            <select style="width: 50%" class="form-control category_id" name="category_id">
                @foreach($operation_categories as $operation_category)
                    <option value="{{ $operation_category->id }}">{{ $operation_category->category }}</option>
                @endforeach
            </select>

            @if(auth()->user()->can('operation-categories-create'))
            <div class="input-group-append" style="margin: auto 10px;">
                <button class="btn btn-success add_btn" id="create_operation_category" type="button"> + </button>
            </div>
            @endif
        </div>
        <span class="text-danger error_category_id" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="priority" class="form-label">Priority<span class="text-danger"><b>*</b></span></label>
        <input type="number" value="{{ $priority }}" class="form-control" name="priority" disabled aria-describedby="inputGroupPrepend">
        <span class="text-danger error_priority" style="display:none;">This field is required.</span>
    </div>
</form>
