<form class="row g-3 auto-width" action="{{ route('incentive-slab-details.update', $Incentive_slab_detail->id)}}" method="post" enctype='multipart/form-data'>
    @csrf
    @method('patch')
     {{-- Slab --}}
     <div class="col-md-6">
        <div>
            <label for="slab_id" class="form-label">Slab <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <select class="single-select form-control" name="slab_id"> 
                @foreach ($slab as $list)
                    <option value="{{ $list->id }}" {{ $list->id == $Incentive_slab_detail->slab_id ? 'selected':'' }}>{{ $list->slab_name }}</option>
                @endforeach
            </select>
        </div>
        <span class="text-danger error_slab_id" style="display: none;">This field is required.</span>
    </div>
    {{-- Calaulation Type --}}
    <div class="col-md-6">
        <label for="calculation_type" class="form-label" >Calculation Type </label>
        <select class="form-select" aria-label="calculation_type" name="calculation_type">
            <option selected value="">Select Calculation Type</option>
            <option value="percentage" {{ matchSelected($Incentive_slab_detail->calculation_type,'percentage') }}>PERCENTAGE</option>
            <option value="quantity" {{ matchSelected($Incentive_slab_detail->calculation_type,'quantity') }}>QUANTITY</option>
          </select>
        <span class="text-danger error_percentage" style="display:none;">This field is required.</span>
    </div>
    {{-- Product --}}
    <div class="col-md-6">
        <div>
            <label for="product_id" class="form-label">Product <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <select class="single-select form-control" name="product_id">
                @foreach ($product as $list)
                    <option value="{{ $list->id }}">{{ $list->name }}</option>
                    <option value="{{ $list->id }}" {{ $list->id == $Incentive_slab_detail->product_id ? 'selected':'' }}>{{ $list->name }}</option>
                @endforeach
            </select>
        </div>
        <span class="text-danger error_product_id" style="display: none;">This field is required.</span>
    </div>
       {{-- percentage --}}
       <div class="col-md-6">
        <label for="percentage" class="form-label">Percentage % </label>
        <input type="number" class="form-control" id="percentage" name="percentage" aria-describedby="inputGroupPrepend" required value="{{$Incentive_slab_detail->percentage}}">
        </div>
   
      {{-- price --}}
      <div class="col-md-6">
        <label for="price" class="form-label">Price </label>
        <input type="number" class="form-control" id="price" name="price" aria-describedby="inputGroupPrepend" required  value="{{$Incentive_slab_detail->price}}">
    </div>
</form>