<form class="row g-3 auto-width voucher_type" action="{{ route('voucher-types.store')}}" method="post" enctype='multipart/form-data' id="type_form">
    @csrf
    <div class="col-md-12">
        <label for="voucher_name" class="form-label">Name <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="name" name="name" aria-describedby="inputGroupPrepend" required placeholder="Name">
        <span class="text-danger error_name" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="voucher_code" class="form-label">Code <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="code" name="code" aria-describedby="inputGroupPrepend" required placeholder="Code">
        <span class="text-danger error_code" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="default_price_type" class="form-label">Default Price Type <span class="text-danger"><b>*</b></span></label>
        <select class="form-control select2" name="default_price_type">
            <option value="MRP">MRP</option>
            <option value="Purchase Price">Purchase Price</option>
            <option value="WholeSale Price">WholeSale Price</option>
            <option value="Discounted/Sale Price(DP)">Discounted/Sale Price(DP)</option>
            <option value="Min. Sale Price">Min. Sale Price</option>
            <option value="Manufacturing Cost">Manufacturing Cost</option>
        </select>
        <span class="text-danger error_default_price_type" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="voucher_title" class="form-label">Voucher Title <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="voucher_title" name="voucher_title" aria-describedby="inputGroupPrepend" required placeholder="Voucher Title">
        <span class="text-danger error_voucher_title" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="page_title" class="form-label">Page Title <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="page_title" name="page_title" aria-describedby="inputGroupPrepend" required placeholder="Voucher Title">
        <span class="text-danger error_page_title" 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="text" class="form-control" id="priority" name="priority" aria-describedby="inputGroupPrepend" required value="{!! $priority + 1 ?? 1 !!}">
        <span class="text-danger error_priority" style="display:none;">This field is required.</span>
    </div>
    {{-- <div class="col-md-12">
        <div>
            <label for="voucher_master_id" class="form-label">Select Voucher Master</label>
        </div>
        <div class="input-group">
            <select class="single-select form-control" id="voucher_master_id" name="voucher_master_id" required>
                <option value=""> -- Select Voucher Master -- </option>
                @foreach ($voucher_masters as $key => $list)
                    <option value="{!! $list->id !!}">{!! $list->voucher_name !!}</option>
                @endforeach
            </select>
            <div class="input-group-append" style="margin: auto 10px;">
                <button class="btn btn-success add_btn" id="create_voucher_master" type="button"> + </button>
            </div>
        </div>
        <span class="text-danger error_voucher_master_id" style="display: none;">This field is required.</span>
    </div> --}}
    <input type="hidden" name="voucher_master_id">
</form>