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

    <div class="card shadow-sm" style="max-width:600px">
        <div class="card-body">
            <form action="{{ route('vendors.store') }}" method="POST">
                @csrf
                <div class="mb-3">
                    <label class="form-label" for="name">{{ __('Vendor Name') }} <span class="text-danger">*</span></label>
                    <input id="name" type="text" name="name" class="form-control @error('name') is-invalid @enderror"
                           value="{{ old('name') }}" required autofocus>
                    @error('name')<div class="invalid-feedback">{{ $message }}</div>@enderror
                </div>
                <div class="mb-3">
                    <label class="form-label" for="phone">{{ __('Phone') }}</label>
                    <input id="phone" type="text" name="phone" class="form-control"
                           value="{{ old('phone') }}">
                </div>
                <div class="mb-3">
                    <label class="form-label" for="address">{{ __('Address') }}</label>
                    <textarea id="address" name="address" class="form-control" rows="2">{{ old('address') }}</textarea>
                </div>
                <button type="submit" class="btn btn-primary">{{ __('Save Vendor') }}</button>
                <a href="{{ route('vendors.index') }}" class="btn btn-secondary">{{ __('Cancel') }}</a>
            </form>
        </div>
    </div>
</x-app-layout>
