<form class="row g-3 auto-width countries_update" action="{{ route('countries.update', $data->id)}}" method="post" enctype='multipart/form-data'>
    @csrf
    @method('PUT')
    {{-- Name --}}
    <div class="col-md-6">
        <label for="validationCustomTitle" class="form-label">Name <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="name" aria-describedby="inputGroupPrepend" required value="{!! $data->name !!}">
        @if ($errors->has('name'))
        <span class="text-danger">{{ $errors->first('name') }}</span>
        @endif
        <span class="text-danger error_name" style="display: none;">This field is required.</span>
    </div>
    {{-- code --}}
    <div class="col-md-6">
        <label for="validationCustomTitle" class="form-label">Code <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="code" aria-describedby="inputGroupPrepend" required value="{!! $data->code !!}">
        @if ($errors->has('code'))
        <span class="text-danger">{{ $errors->first('code') }}</span>
        @endif
        <span class="text-danger error_code" style="display: none;">This field is required.</span>
    </div>
    {{-- capital --}}
    <div class="col-md-6">
        <label for="validationCustomTitle" class="form-label">Capital <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="capital" aria-describedby="inputGroupPrepend" required value="{!! $data->capital !!}">
        @if ($errors->has('capital'))
        <span class="text-danger">{{ $errors->first('capital') }}</span>
        @endif
        <span class="text-danger error_capital" style="display: none;">This field is required.</span>
    </div>
    {{-- gsm_code --}}
    <div class="col-md-6">
        <label for="validationCustomTitle" class="form-label">Gsm Code <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="gsm_code" aria-describedby="inputGroupPrepend" required value="{!! $data->gsm_code !!}">
        @if ($errors->has('gsm_code'))
        <span class="text-danger">{{ $errors->first('gsm_code') }}</span>
        @endif
        <span class="text-danger error_gsm_code" style="display: none;">This field is required.</span>
    </div>
    {{-- currency_fullname --}}
    <div class="col-md-6">
        <label for="validationCustomTitle" class="form-label">Currency Fullname <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="currency_fullname" aria-describedby="inputGroupPrepend" required value="{!! $data->currency_fullname !!}">
        @if ($errors->has('currency_fullname'))
        <span class="text-danger">{{ $errors->first('currency_fullname') }}</span>
        @endif
        <span class="text-danger error_currency_fullname" style="display: none;">This field is required.</span>
    </div>
    {{-- currency_short_name --}}
    <div class="col-md-6">
        <label for="validationCustomTitle" class="form-label">Currency Short Name <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="currency_short_name" aria-describedby="inputGroupPrepend" required value="{!! $data->currency_short_name !!}">
        @if ($errors->has('currency_short_name'))
        <span class="text-danger">{{ $errors->first('currency_short_name') }}</span>
        @endif
        <span class="text-danger error_currency_short_name" style="display: none;">This field is required.</span>
    </div>
    {{-- currency_symbol --}}
    <div class="col-md-6">
        <label for="validationCustomTitle" class="form-label">Currency Symbol <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="currency_symbol" aria-describedby="inputGroupPrepend" required value="{!! $data->currency_symbol !!}">
        @if ($errors->has('currency_symbol'))
        <span class="text-danger">{{ $errors->first('currency_symbol') }}</span>
        @endif
        <span class="text-danger error_currency_symbol" style="display: none;">This field is required.</span>
    </div>
    {{-- formats --}}
    <div class="col-md-6">
        <label for="validationCustomTitle" class="form-label">Formats <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="formats" aria-describedby="inputGroupPrepend" required value="{!! $data->formats !!}">
        @if ($errors->has('formats'))
        <span class="text-danger">{{ $errors->first('formats') }}</span>
        @endif
        <span class="text-danger error_formats" style="display: none;">This field is required.</span>
    </div>
    {{-- sale tax type --}}
    <div class="col-md-6">
        <label for="sale_tax_type" class="form-label">Sale Tax Type <span class="text-danger"><b>*</b></span></label>
        <select class="form-select" aria-label="sale_tax_type" name="sale_tax_type">
            <option value="gst" {{ matchSelected($data->sale_tax_type,'gst') }}>GST</option>
            <option value="vat" {{ matchSelected($data->sale_tax_type,'vat') }}>VAT</option>
        </select>
        <span class="text-danger error_sale_tax_type" style="display:none;">This field is required.</span>
    </div>
    {{-- priority --}}
    <div class="col-md-6">
        <label for="priority" class="form-label">Priority </label>
        <input type="number" class="form-control" id="priority" name="priority" aria-describedby="inputGroupPrepend" required value="{{$data->priority}}">
        <span class="text-danger error_priority" style="display:none;">This field is required.</span>
    </div>
     {{-- financial_year_start_month --}}
     <div class="col-md-6">
        <label for="validationCustomTitle" class="form-label">Financial Year Start Month <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="financial_year_start_month" aria-describedby="inputGroupPrepend" required value="{!! $data->financial_year_start_month !!}">
        @if ($errors->has('financial_year_start_month'))
        <span class="text-danger">{{ $errors->first('financial_year_start_month') }}</span>
        @endif
        <span class="text-danger error_financial_year_start_month" style="display: none;">This field is required.</span>
    </div>
     {{-- financial_year_start_date --}}
     <div class="col-md-6">
        <label for="validationCustomTitle" class="form-label">Financial Year Start Date <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="financial_year_start_date" aria-describedby="inputGroupPrepend" required value="{!! $data->financial_year_start_date !!}">
        @if ($errors->has('financial_year_start_date'))
        <span class="text-danger">{{ $errors->first('financial_year_start_date') }}</span>
        @endif
        <span class="text-danger error_financial_year_start_date" style="display: none;">This field is required.</span>
    </div>
     {{-- financial_year_end_month --}}
     <div class="col-md-6">
        <label for="validationCustomTitle" class="form-label">Financial Year End Month <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="financial_year_end_month" aria-describedby="inputGroupPrepend" required value="{!! $data->financial_year_end_month !!}">
        @if ($errors->has('financial_year_end_month'))
        <span class="text-danger">{{ $errors->first('financial_year_end_month') }}</span>
        @endif
        <span class="text-danger error_financial_year_end_month" style="display: none;">This field is required.</span>
    </div>
     {{-- financial_year_end_date --}}
     <div class="col-md-6">
        <label for="validationCustomTitle" class="form-label">Financial Year End Date <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="financial_year_end_date" aria-describedby="inputGroupPrepend" required value="{!! $data->financial_year_end_date !!}">
        @if ($errors->has('financial_year_end_date'))
        <span class="text-danger">{{ $errors->first('financial_year_end_date') }}</span>
        @endif
        <span class="text-danger error_financial_year_end_date" style="display: none;">This field is required.</span>
    </div>
</form>
