<x-app-layout>

<div class="col-12">
    <div class="card">
        <div class="card-body">
            <x-form action="{{ route('employers.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>
                                    </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="" />
                                            <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" />
                                            @can('all_permissions')
                                            <x-form.entity name="admin_id" label="Admin" :items="App\Models\User::all()" :value="old('admin_id')"  choiceLabel="email"   />
                                            @endcan
                                            <x-form.entity name="roles_id" label="Role" :items="App\Models\Role::all()" :value="old('roles_id')"  choiceLabel="name" classGroup="required" multiple="true" />
                                                <div class="card">
                                                    <div class="card-body">
                                                        <h5 class="dividing">{{ __('Account information') }}</h5>
                                                        <div class="mt-3">
                                                        <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>
                        </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>

