@props([
    'action',
    'method' => 'POST',
    'submitLabel',
])

<form method="POST" action="{{ $action }}" novalidate>
    @csrf
    @if (strtoupper($method) !== 'POST')
        @method($method)
    @endif

    <div class="card">
        <div class="card-body">
            <div class="row g-3">
                <div class="col-md-8">
                    <x-ui.form.input
                        name="name"
                        :label="__('inventory.warehouses.fields.name')"
                        :value="old('name')"
                        :placeholder="__('inventory.warehouses.placeholders.name')"
                        required
                    />
                </div>
            </div>
            <div class="d-flex justify-content-end gap-2 mt-4">
                <x-ui.buttons.secondary :href="route('inventory.warehouses.index')">
                    {{ __('common.cancel') }}
                </x-ui.buttons.secondary>
                <x-ui.buttons.primary type="submit">{{ $submitLabel }}</x-ui.buttons.primary>
            </div>
        </div>
    </div>
</form>
