<x-app-layout>

<div class="col-12">
    <div class="card">
        <div class="card-body">
            <x-form method="post" action="{{ route('offices.store') }}" enctype="multipart/form-data">
                @csrf
                <div class="card">
                    <div class="card-body">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="card">
                                    <div class="card-body">
                                        <h5 class="dividing">{{ __('General Info') }}</h5>
                                        <div class="row mt-3">
                                            <x-form.input name="name" value="{{ old('name')}}" classGroup="col-md-6 required" />
                                            <x-form.input name="email" value="{{ old('email')}}" classGroup="col-md-6 required" />  
                                        </div>
                                        <x-form.input name="address" value="{{ old('address')}}" classGroup="required" />
                                        <x-form.input name="phone" value="{{ old('phone')}}" classGroup="required" />
                                    </div>
                                </div>
                                <div class="card">
                                    <div class="card-body">
                                        <x-form.input name="employers_number" value="{{ old('employers_number')}}" classGroup="required" />
                                        <x-form.switch name="status" value="{{ old('status')}}"  />
                                    </div>
                                    
                                    <div class="card-body">
                                        <lable  style="font-weight:700px;" >is_admin</lable>
                                        <br>
                                        <br>
                                        <div class="form-check form-check-inline">
                                          <input class="form-check-input" type="radio"  value="1" name="is_admin" id="flexRadioDefault1">
                                          <label class="form-check-label" for="flexRadioDefault1">
                                             yes
                                          </label>
                                        </div>
                                        <div class="form-check form-check-inline">
                                          <input class="form-check-input" type="radio"  value="0"  name="is_admin" id="flexRadioDefault2" checked>
                                          <label class="form-check-label" for="flexRadioDefault2">
                                             no
                                          </label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="card">
                                    <div class="card-body">
                                        <h5 class="dividing">{{ __('Additional information') }}</h5>
                                        <div class="mt-3">
                                            <x-form.upload name="image" value="{{ old('image')}}" label="Avatar" />                                         
                                        </div>
                                    </div>
                                </div>
                                <div class="card">
                                    <div class="card-body">
                                        <h5 class="dividing">{{ __('Account information') }}</h5>
                                        <div class="mt-3">
                                            <x-form.input name="booking_commission" label="Booking Commission" value="{{ old('booking_commission')}}" classGroup="required" />
                                            <x-form.input name="exchange_commission" label="Exchange Commission" value="{{ old('exchange_commission')}}" classGroup="required" />
                                            <x-form.input name="canellation_commission" label="Canellation Commission" value="{{ old('canellation_commission')}}" classGroup="required" />
                                            <x-form.entity name="currency_code" label="Currency" :items="DB::table('currencies')->get()" value="{{ old('currency_code') }}"  choiceLabel="name" choiceValue="code" classGroup="required" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="card-footer">
                        <x-button  class="btn btn-primary" > {{__('save')}} </x-button>
                    </div>
                </div>
            </x-form>
        </div>
    </div>
</div>


</x-app-layout>
