<div class="max-w-lg mx-auto p-8 bg-white shadow-lg rounded-lg">
    <div class="mx-auto ">
        <form wire:submit.prevent="updateExchangerate" class="space-y-3">

            <div class="mb-2">
                <label for="currency" class="block text-sm font-medium text-gray-700">Currency</label>
                <input type="text" wire:model.defer="currency" id="currency"
                    class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm">
                @error('currency')
                    <span class="text-red-500">{{ $message }}</span>
                @enderror
            </div>

            <div class="mb-2">
                <label for="exdate" class="block text-gray-700">Expired date</label>
                <input type="date" id="exdate"
                    class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm"
                    wire:model.defer="exdate">
                @error('exdate')
                    <span class="text-red-500">{{ $message }}</span>
                @enderror
            </div>
            <div class="mb-2">
                <label for="finishdate" class="block text-gray-700">Finish date</label>
                <input type="date" id="finishdate"
                    class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm"
                    wire:model.defer="finishdate">
            </div>

            <div class="mb-2">
                <label for="rate" class="block text-sm font-medium text-gray-700">Rate</label>
                <input type="text" wire:model.defer="rate" id="rate"
                    class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm">
            </div>
            <div class="mb-2">
                <label for="baht" class="block text-sm font-medium text-gray-700">Baht</label>
                <input type="text" wire:model.defer="baht" id="baht"
                    class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm">
            </div>
            <div class="mb-2">
                <label for="exbaht" class="block text-sm font-medium text-gray-700">Export Baht</label>
                <input type="text" wire:model.defer="exbaht" id="exbaht"
                    class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm">
            </div>
            <div class="flex justify-end space-x-4 mt-4">
                <a href="/exchange-rate" type="button"
                    class="px-4 py-2 bg-gray-200 text-gray-700 rounded-md shadow-sm hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-400">Cancel</a>
                <button type="submit"
                    class="bg-primary inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
                    Update
                </button>
            </div>
        </form>
    </div>
</div>
