<?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('new_bank') ?></h4>
       
    </div>
    <div class="p-5">
        <form data-parsley-validate="" novalidate="" enctype="multipart/form-data"
              action="<?php echo base_url() ?>admin/user/update_bank_info/<?php echo $profile_info->user_id; ?>/<?php
              if (!empty($bank_info->employee_bank_id)) {
                  echo $bank_info->employee_bank_id;
              }
              ?>"
              method="post" class="space-y-4">

            <input type="hidden" name="employee_bank_id" value="<?php
                if (!empty($bank_info->employee_bank_id)) {
                    echo $bank_info->employee_bank_id;
                }
                ?>">

            <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                <?= form_input_group('bank_name', lang('bank') . ' ' . lang('name'), !empty($bank_info->bank_name) ? $bank_info->bank_name : '', 'text', true); ?>
                <?= form_input_group('routing_number', lang('routing_number'), !empty($bank_info->routing_number) ? $bank_info->routing_number : '', 'text', true); ?>
                <?= form_input_group('account_name', lang('name_of_account'), !empty($bank_info->account_name) ? $bank_info->account_name : '', 'text', true); ?>
                <?= form_input_group('account_number', lang('account_number'), !empty($bank_info->account_number) ? $bank_info->account_number : '', 'text', true); ?>
            </div>

            <?= form_radio_group('type_of_account', lang('type_of_account'), array(
                'checking' => lang('checking'),
                'savings' => lang('savings'),
            ), !empty($bank_info->type_of_account) ? $bank_info->type_of_account : 'checking', false); ?>

            <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>
