<x-ui.layout.page :title="__('loans.actions.request')" page-icon="fe fe-dollar-sign">
    <x-slot:actions><x-ui.buttons.secondary :href="route('me.loans.index')">{{ __('common.back') }}</x-ui.buttons.secondary></x-slot:actions>
    <div class="card"><div class="card-body">
        <form method="POST" action="{{ route('me.loans.store') }}" class="row g-3">@csrf
            <div class="col-md-6"><x-ui.form.select name="type" :label="__('loans.fields.type')" :options="collect($types)->mapWithKeys(fn($v)=>[$v=>__('loans.types.'.$v)])->all()" required /></div>
            <div class="col-md-6"><x-ui.form.input name="amount" type="number" step="0.01" :label="__('loans.fields.amount')" required /></div>
            <div class="col-md-6"><x-ui.form.input name="installment_count" type="number" :label="__('loans.fields.installments')" required /></div>
            <div class="col-md-6"><x-ui.form.input name="start_date" type="date" :label="__('loans.fields.start_date')" required /></div>
            <div class="col-12"><x-ui.form.input name="reason" :label="__('loans.fields.reason')" /></div>
            <div class="col-12"><x-ui.form.input name="notes" :label="__('loans.fields.notes')" /></div>
            <div class="col-12"><x-ui.buttons.primary type="submit">{{ __('loans.actions.request') }}</x-ui.buttons.primary></div>
        </form>
    </div></div>
</x-ui.layout.page>
