<form method="post" onsubmit="saveForm(this)" action="{{ $action }}" enctype="multipart/form-data">
    @if($category ?? ''  && $category->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"> {{ __('categories.start_price') }} </label>
                    <input type="number" step=".01" name="start_price" class="form-control" value="{{$category->start_price ?? ''}}" placeholder="{{ __('categories.start_price') }}">
                </div>

                <div class="form-group mb-3">
                    <label for="" class="d-block mb-2"> {{ __('categories.end_price') }} </label>
                    <input type="number" step=".01" name="end_price" class="form-control" value="{{$category->end_price ?? ''}}" placeholder="{{ __('categories.end_price') }}">
                </div>

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