@extends('layouts.app')

@section('page-title', 'Create Particular')

@section('content')
<div class="row justify-content-center">
    <div class="col-md-6">
        <div class="card shadow-sm">
            <div class="card-header bg-primary text-white">
                <h5 class="mb-0"><i class="fas fa-plus-circle me-2"></i>Create Particular</h5>
            </div>
            <div class="card-body">
                @if($errors->any())
                    <div class="alert alert-danger">
                        <ul class="mb-0">
                            @foreach($errors->all() as $err)
                                <li>{{ $err }}</li>
                            @endforeach
                        </ul>
                    </div>
                @endif

                <form method="POST" action="{{ route('particulars.store') }}">
                    @csrf
                    <div class="mb-3">
                        <label for="particulars" class="form-label">Particulars</label>
                        <input type="text"
                               class="form-control @error('particulars') is-invalid @enderror"
                               id="particulars"
                               name="particulars"
                               value="{{ old('particulars') }}"
                               placeholder="Enter particulars">
                        @error('particulars')
                            <div class="invalid-feedback">{{ $message }}</div>
                        @enderror
                    </div>
                    <div class="d-flex justify-content-between">
                        <button type="submit" class="btn btn-primary">
                            <i class="fas fa-save me-1"></i> Save
                        </button>
                        <a href="{{ route('particulars.index') }}" class="btn btn-secondary">
                            <i class="fas fa-arrow-left me-1"></i> Back to list
                        </a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
@endsection
