<div class="max-w-lg mx-auto p-8 bg-white shadow-lg rounded-lg">
    <div class="mx-auto ">
        <form wire:submit.prevent="addExchangerate" 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="w-full mt-1 p-2 border border-gray-300 rounded-md"
                    wire:model.defer="exdate">
            </div>
            <div class="mb-2">
                <label for="finishdate" class="block text-gray-700">Finish date</label>
                <input type="date" id="finishdate" class="w-full mt-1 p-2 border border-gray-300 rounded-md"
                    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="w-full mt-1 p-2 border border-gray-300 rounded-md">
            </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="w-full mt-1 p-2 border border-gray-300 rounded-md">
            </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="w-full mt-1 p-2 border border-gray-300 rounded-md">
            </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" type="submit"
                    class="px-4 py-2 bg-primary text-white rounded-md shadow-sm hover:bg-primary-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">Save</button>
            </div>
        </form>
    </div>
</div>
