<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>

<div class="rounded-2xl border border-border bg-card shadow-sm">
    <div class="flex items-center justify-between border-b border-border px-5 py-4">
        <h4 class="text-sm font-semibold text-foreground"><?= lang('user') . ' ' . lang('details') ?></h4>
       
    </div>
    <div class="p-5">
        <form data-parsley-validate="" novalidate=""
              action="<?php echo base_url() ?>admin/user/update_details/<?php if (!empty($profile_info->account_details_id)) echo $profile_info->account_details_id; ?>"
              method="post" class="space-y-4">
            <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                <?= form_input_group('employment_id', lang('emp_id'), !empty($profile_info->employment_id) ? $profile_info->employment_id : '', 'text', true); ?>
                <?= form_datepicker('joining_date', lang('joining_date'), !empty($profile_info->joining_date) ? $profile_info->joining_date : '', true, array('class' => 'datepicker', 'data-date-format' => config_item('date_picker_format'))); ?>

                <?= form_select_group('gender', lang('gender'), array(
                    'male' => lang('male'),
                    'female' => lang('female'),
                ), !empty($profile_info->gender) ? $profile_info->gender : 'male', true); ?>

                <?= form_datepicker('date_of_birth', lang('date_of_birth'), !empty($profile_info->date_of_birth) ? $profile_info->date_of_birth : '', true, array('class' => 'datepicker', 'data-date-format' => config_item('date_picker_format'))); ?>

                <?= form_select_group('maratial_status', lang('maratial_status'), array(
                    'married' => lang('married'),
                    'unmarried' => lang('unmarried'),
                    'widowed' => lang('widowed'),
                    'divorced' => lang('divorced'),
                ), !empty($profile_info->maratial_status) ? $profile_info->maratial_status : 'unmarried', true); ?>

                <?= form_input_group('father_name', lang('fathers_name'), !empty($profile_info->father_name) ? $profile_info->father_name : '', 'text', true); ?>
                <?= form_input_group('mother_name', lang('mother_name'), !empty($profile_info->mother_name) ? $profile_info->mother_name : '', 'text', true); ?>

                <?= form_input_group('phone', lang('phone'), !empty($profile_info->phone) ? $profile_info->phone : '', 'text', false, array('placeholder' => lang('eg') . ' ' . lang('user_placeholder_phone'))); ?>
                <?= form_input_group('mobile', lang('mobile'), !empty($profile_info->mobile) ? $profile_info->mobile : '', 'text', false, array('placeholder' => lang('eg') . ' ' . lang('user_placeholder_mobile'))); ?>
                <?= form_input_group('skype', lang('skype_id'), !empty($profile_info->skype) ? $profile_info->skype : '', 'text', false, array('placeholder' => lang('eg') . ' ' . lang('user_placeholder_skype'))); ?>
                <?= form_input_group('passport', lang('passport'), !empty($profile_info->passport) ? $profile_info->passport : '', 'text'); ?>
            </div>

            <?= form_textarea_group('present_address', lang('present_address'), !empty($profile_info->present_address) ? $profile_info->present_address : '', 3); ?>

            <div class="flex items-center justify-end gap-2 pt-2">
                <button type="button" class="rounded-lg border border-border px-4 py-2 text-xs font-semibold text-foreground hover:bg-muted" data-dismiss="modal"><?= lang('close') ?></button>
                <button type="submit" class="rounded-lg bg-indigo-600 px-4 py-2 text-xs font-semibold text-white shadow-sm hover:bg-indigo-500"><?= lang('update') ?></button>
            </div>
        </form>
    </div>
</div>
