<form method="post" onsubmit="saveForm(this)" action="{{ $action }}" enctype="multipart/form-data">
    @if($deal_status ?? ''  && $deal_status->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">
                <div class="form-group mb-3">
                    <label for="" class="d-block mb-2"> {{ __('deal_statuses.color') }} </label>
                    <input type="color" name="color" class="form-control" value="{{$deal_status->color ?? ''}}" placeholder="{{ __('deal_statuses.color') }}">
                </div>
                <div class="form-group mb-3">
                    <label for="" class="d-block mb-2"> {{ __('deal_statuses.rank') }} </label>
                    <input type="number" name="rank" class="form-control" value="{{$deal_status->rank ?? ''}}" placeholder="{{ __('deal_statuses.rank') }}">
                </div>

                @foreach($languages as $language)
                    <div class="col-lg-6">
                        <div class="form-group mb-3">
                            <label for="" class="d-block mb-2"> {{ __('deal_statuses.title') }} {{ count($languages) > 1 ? "({$language->name})" : '' }} </label>
                            <input type="text" name="title_{{ $language->local }}" class="form-control" value="{{  $deal_status[$language->local]->title ?? "" }}" placeholder=" {{ __('deal_statuses.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>
