<form method="post" onsubmit="saveForm(this)" action="{{ $action }}" enctype="multipart/form-data">
    @if($deal ?? ''  && $deal->id)
        @method('PUT')
    @endif
    @csrf
    <div class="modal-header">
        <h1 class="modal-title fs-6" id="exampleModalLabel"> <i class="fal fa-user me-1"></i> {{$head ?? ''}} </h1>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
    </div>
    <div class="modal-body">
        <div class="modal-form">
            <div class="row">
                @foreach($languages as $language)
                    <div class="col-lg-6">
                        <div class="form-group mb-3">
                            <label for="" class="d-block mb-2"> {{ __('deals.title') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} <span style="color:red">*</span></label>
                            <input type="text" name="title_{{ $language->local }}" class="form-control" value="{{  $deal[$language->local]->title ?? "" }}" placeholder=" {{ __('deals.title') }}">
                        </div>
                    </div>
                @endforeach

            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="line-butn butn-st2 butn-md" data-bs-dismiss="modal" aria-label="Close"><span> {{ __('dashboard.cancel') }} </span></button>
        <button type="submit" class="blue-butn butn-st2 butn-md"><span> {{ __('dashboard.save') }} </span></button>
    </div>
</form>

<script src="{{url('')}}/assets/admin/js/custom/imageUpload.js"></script>
