<x-admin-app-layout>
    <div class="white-box">
        <x-admin::page-header title="{{ __('Coin Settings') }}" :dateFilter="false" />
        <form method="POST" action="{{ route('admin.settings.coin-settings.store') }}" class="form-submit-edit">
            @csrf
            <div class="flex flex-col gap-4 xxl:gap-6 mt-6">
                <div class="border border-neutral-30 dark:border-neutral-700 p-4 rounded space-y-4">
                    <h4 class="m-text font-medium">{{ __('Score ↔ Coin Ratio') }}</h4>
                    <div class="grid grid-cols-2 gap-4 xl:gap-6">
                        <x-admin::text-input-group name="score_ratio[coin]" label="Coins" :value="$coin_settings['score_ratio']['coin'] ?? ''" />
                        <x-admin::text-input-group name="score_ratio[score]" label="Score" :value="$coin_settings['score_ratio']['score'] ?? ''" />
                    </div>
                </div>
                <div class="border border-neutral-30 dark:border-neutral-700 p-4 rounded space-y-4">
                    <h4 class="m-text font-medium">{{ __(config('application_info.defaultCurrency.code').' ↔ Coin Ratio') }}</h4>
                    <div class="grid grid-cols-2 gap-4 xl:gap-6">
                        <x-admin::text-input-group name="usd_ratio[coin]" label="Coins" :value="$coin_settings['usd_ratio']['coin'] ?? ''" />
                        <x-admin::text-input-group name="usd_ratio[usd]" label="{{ config('application_info.defaultCurrency.code') }}" :value="$coin_settings['usd_ratio']['usd'] ?? ''" />
                    </div>
                </div>
                <div class="border border-neutral-30 dark:border-neutral-700 p-4 rounded space-y-4">
                    <h4 class="m-text font-medium">{{ __('Initial Balance') }}</h4>
                    <div class="grid grid-cols-2 gap-4 xl:gap-6">
                        <div class="col-span-2">
                            <x-admin::text-input-group name="initial_balance" label="Initial Balance"
                                :value="$coin_settings['initial_balance'] ?? ''" />
                        </div>
                    </div>
                </div>
            </div>
            <div class="flex items-center justify-end mt-4">
                <x-admin::primary-button>
                    {{ __('Save') }}
                </x-admin::primary-button>
            </div>
        </form>
    </div>
</x-admin-app-layout>
