<x-app-layout>
    <x-slot name="header">{{ __('Add Currency') }}</x-slot>

    <div class="card shadow-sm">
        <div class="card-body">
            <form action="{{ route('currencies.store') }}" method="POST">
                @csrf
                <div class="row g-3">
                    <div class="col-md-4">
                        <label class="form-label" for="name">{{ __('Name') }}</label>
                        <input id="name" type="text" name="name" class="form-control" value="{{ old('name') }}" required>
                    </div>
                    <div class="col-md-4">
                        <label class="form-label" for="code">{{ __('Code') }}</label>
                        <input id="code" type="text" name="code" class="form-control" value="{{ old('code') }}" required>
                    </div>
                    <div class="col-md-4">
                        <label class="form-label" for="symbol">{{ __('Symbol') }}</label>
                        <input id="symbol" type="text" name="symbol" class="form-control" value="{{ old('symbol') }}">
                    </div>
                </div>

                <div class="row g-3 mt-3">
                    <div class="col-md-6">
                        <label class="form-label" for="exchange_rate">{{ __('Exchange Rate') }}</label>
                        <input id="exchange_rate" type="number" step="0.0001" name="exchange_rate" class="form-control" value="{{ old('exchange_rate', 1.0000) }}" required>
                    </div>
                    <div class="col-md-6">
                        <label class="form-label" for="status">{{ __('Status') }}</label>
                        <select id="status" name="status" class="form-select">
                            <option value="active">{{ __('Active') }}</option>
                            <option value="inactive">{{ __('Inactive') }}</option>
                        </select>
                    </div>
                </div>

                <div class="mt-3">
                    <button type="submit" class="btn btn-primary">{{ __('Save Currency') }}</button>
                    <a href="{{ route('currencies.index') }}" class="btn btn-secondary">{{ __('Cancel') }}</a>
                </div>
            </form>
        </div>
    </div>
</x-app-layout>
