<div class="row g-xl-4 g-3">
    <div class="col-12">
        <div class="left-part">
            <div class="contentbox">
                <div class="inside">
                    <div class="contentbox-title">
                        <h3>{{ isset($extraCharge) ? __('cabbooking::static.extra_charges.edit') : __('cabbooking::static.extra_charges.add') }}</h3>
                    </div>
                    <div class="form-group row">
                        <label class="col-md-2" for="title">{{ __('cabbooking::static.extra_charges.title') }} <span> *</span></label>
                        <div class="col-md-10">
                            <input class="form-control" type="text" name="title" value="{{ isset($extraCharge->title) ? $extraCharge->title : old('title') }}" placeholder="{{ __('cabbooking::static.extra_charges.enter_title') }}" required>
                            @error('title')
                            <span class="invalid-feedback d-block" role="alert">
                                <strong>{{ $message }}</strong>
                            </span>
                            @enderror
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-md-2" for="role">{{ __('cabbooking::static.status') }}</label>
                        <div class="col-md-10">
                            <div class="editor-space">
                                <label class="switch">
                                    <input class="form-control" type="hidden" name="status" value="0">
                                    <input class="form-check-input" type="checkbox" name="status" id=""
                                        value="1" @checked(@$extraCharge?->status ?? true)>
                                    <span class="switch-state"></span>
                                </label>
                            </div>
                            @error('status')
                                <span class="invalid-feedback d-block" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-12">
                            <div class="submit-btn">
                                <button type="submit" name="save" class="btn btn-primary spinner-btn">
                                    <i class="ri-save-line text-white lh-1"></i> {{ __('cabbooking::static.save') }}
                                </button>
                                <button type="submit" name="save_and_exit" class="btn btn-primary spinner-btn">
                                    <i class="ri-expand-left-line text-white lh-1"></i>{{ __('cabbooking::static.save_and_exit') }}
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@push('scripts')
    <script>
        (function($) {
            "use strict";
            $('#extraChargeForm').validate({
                rules: {
                    "title": "required",
                }
            });
        })(jQuery);
    </script>
@endpush
