<div class="modal fade lead-modal" id="lead-modal" aria-labelledby="modalLabel" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg">
        <div class="modal-content data">
            <div class="modal-header modal-header-image mb-3">
                <h5 class="modal-title text-white">{{ @$data['title'] }} </h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
                    <i class="fa fa-times text-white" aria-hidden="true"></i>
                </button>
            </div>
            <div class="modal-body">
                <form action="{{ $data['url'] }}" class="row p-2" method="post" id="modal_values">
                    @csrf

                    <div class="col-md-12 form-group mb-3">
                        <label class="form-label">
                            {{ _trans('common.Departments') }}
                            <span class="text-danger">*</span>
                        </label>

                        <select name="department_ids[]" id="department_ids"
                            class="form-select select2-input ot-input mb-3 modal_select2" required multiple>
                            @foreach (@$data['departments'] ?? [] as $department)
                                <option value="{{ $department->id }}">
                                    {{ $department->title }}
                                </option>
                            @endforeach
                        </select>

                        @if ($errors->has('department_ids'))
                            <div class="error">{{ $errors->first('department_ids') }}</div>
                        @endif
                    </div>

                    <div class="col-md-12 form-group mb-3">
                        <label class="form-label">
                            {{ _trans('common.Holidays') }}
                        </label>
                        <select name="holiday_ids[]" class="form-select select2-input ot-input mb-3 modal_select2"
                            id="holiday_ids" multiple>
                            @foreach (@$data['holidays'] ?? [] as $holiday)
                                <option value="{{ $holiday->id }}">
                                    {{ $holiday->holiday }}
                                </option>
                            @endforeach
                        </select>

                        @if ($errors->has('holiday_ids'))
                            <div class="error">{{ $errors->first('holiday_ids') }}</div>
                        @endif
                    </div>

                    <div class="form-group d-flex justify-content-end">
                        <button type="button"
                            class="btn btn-gradian pull-right hit_modal">{{ @$data['button'] }}</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script src="{{ global_asset('backend/js/fs_d_ecma/modal/__modal.min.js') }}"></script>
<script src="{{ global_asset('backend/js/__loader.js') }}"></script>
