@extends(ucfirst(activeGuard()).'.'.layout())
@section('pagetitle', __('trans.weight'))
@section('content')

<form method="POST" action="{{ route('admin.weights.update', $Model) }}">
    @csrf
    @method('PUT')
    <div class="row">

        {{-- Country --}}
        <div class="form-group col-md-6">
            <label for="country_id">@lang('trans.country')</label>
            <select name="country_id" id="country_id" class="form-control" required>
                <option value="">@lang('trans.choose')</option>
                @foreach($countries as $country)
                    <option value="{{ $country->id }}" {{ old('country_id', $Model->country_id) == $country->id ? 'selected' : '' }}>
                        {{ $country->{'title_'.app()->getLocale()} }}
                    </option>
                @endforeach
            </select>
        </div>

        {{-- Price --}}
        <div class="form-group col-md-6">
            <label for="price">@lang('trans.price')</label>
            <input type="number" step="0.01" min="0" name="price" id="price" class="form-control" required value="{{ old('price', $Model->price) }}">
        </div>

        {{-- Weight --}}
        <div class="form-group col-md-6">
            <label for="weight">@lang('trans.weight')
                 @if (lang()=='ar')
                <span class="">(مل)</span>
                @else
                <span class="">(ML)</span>
            @endif
            </label>
            <input type="number" step="0.01" min="0" name="weight" id="weight" class="form-control" required value="{{ old('weight', $Model->weight) }}">
        </div>

      
        
        
        <div class="col-sm-12 my-4">
            <div class="text-center p-20">
                <button type="submit" class="main-btn btn-hover w-100 text-center">
                    {{ __('trans.Submit') }}
                </button>
            </div>
        </div>
    </div>
</form>
@endsection
