@php($method = $method ?? null)

<div class="card-arena p-4">
    <div class="row g-3">
        <div class="col-md-6">
            <label class="form-label">Name</label>
            <input type="text" name="name" class="form-control" value="{{ old('name', $method?->name) }}" required>
        </div>
        <div class="col-md-6">
            <label class="form-label">Type</label>
            <input type="text" name="type" class="form-control" value="{{ old('type', $method?->type) }}" required>
        </div>
        <div class="col-md-6">
            <label class="form-label">Account Name</label>
            <input type="text" name="account_name" class="form-control" value="{{ old('account_name', $method?->account_name) }}">
        </div>
        <div class="col-md-6">
            <label class="form-label">Account Identifier</label>
            <input type="text" name="account_identifier" class="form-control" value="{{ old('account_identifier', $method?->account_identifier) }}">
        </div>
        <div class="col-md-3">
            <label class="form-label">Sort Order</label>
            <input type="number" name="sort_order" class="form-control" value="{{ old('sort_order', $method?->sort_order ?? 0) }}" min="0">
        </div>
        <div class="col-md-3 d-flex align-items-end">
            <div class="form-check">
                <input type="hidden" name="is_active" value="0">
                <input type="checkbox" name="is_active" value="1" class="form-check-input" id="is_active" @checked(old('is_active', $method?->is_active ?? true))>
                <label class="form-check-label" for="is_active">Active</label>
            </div>
        </div>
        <div class="col-12">
            <label class="form-label">Instructions</label>
            <textarea name="instructions" class="form-control" rows="4">{{ old('instructions', $method?->instructions) }}</textarea>
        </div>
    </div>
</div>
