<x-app-layout>

<div class="col-12 mt-2">
    <div class="card">
        <div class="card-body">
            <x-form action="{{ route('users.store') }}" enctype="multipart/form-data" method="POST">
                @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.entity name="office_id" label="Office" :items="App\Models\Office::all()" value="{{ old('office_id') }}"  choiceLabel="name" classGroup="required" />
                                    </div>
                                </div>
                                <div class="card">
                                    <div class="card-body">
                                            <x-form.input name="password" type="password" classGroup="required" />
                                            <x-form.switch name="status" value="{{ old('status')}}"  />
                                    </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.input name="phone" value="{{ old('phone')}}" classGroup="required"  />
                                            <x-form.select name="locale" value="{{ old('locale')}}" :items="[['value'=>'ar','label'=>'العربية'],['value'=>'en','label'=>'English']]"  />
                                            <x-form.upload name="image" value="{{ old('image')}}" label="Avatar" />
                                        </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>

