<x-admin-app-layout>
    <div class="white-box">
        <x-admin::page-header title="{{ __('Edit Currency') }}" :buttons="$buttons" :isFilterable="false" />

        <form action="{{ route('admin.settings.currencies.update', $currency) }}"
            class="form-submit-edit flex flex-col gap-4" method="POST">
            @csrf
            @method('PUT')
            <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
                <x-admin::text-input-group label="Name" name="name" :value="$currency->name" />
                <x-admin::text-input-group label="Code" name="code" :value="$currency->code" />
                <x-admin::text-input-group label="Symbol" name="symbol" :value="$currency->symbol" />

                <x-admin::text-input-group label="{{ __('Symbol Position') }}" name="symbol_position"
                    :value="$currency->symbol_position" />
                <x-admin::text-input-group label="{{ __('Thousand Separator') }}" name="thousand_separator"
                    :value="$currency->thousand_separator" />
                <x-admin::text-input-group label="{{ __('Decimal Separator') }}" name="decimal_separator"
                    :value="$currency->decimal_separator" />
                <x-admin::text-input-group label="{{ __('Precision') }}" name="precision" :value="$currency->precision" />
                <x-admin::text-input-group label="Rate" name="rate" :value="$currency->rate" />
                <div>
                    <x-admin::label for="is_default">Select Default</x-admin::label>
                    <x-admin::switch label="Make Default" name="is_default" :types="[['label' => __('No'), 'value' => 0], ['label' => __('Yes'), 'value' => 1]]" :value="$currency->is_default" />
                    <x-admin::input-error name="is_default" />
                </div>
            </div>
            <x-admin::primary-button type="submit" class="btn btn-primary">
                {{ __('Save') }}
            </x-admin::primary-button>
        </form>
    </div>
</x-admin-app-layout>
