@extends('layouts.base')

@section('menu')
    @include('admin.menu')
@endsection

@section('content')

@if ($errors->any())
    <div class="alert alert-danger">
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif

<section class="bg-gray">
    <div class="container">
        <div class="card">
            <div class="card-header bg-primary text-white">
                <h4>Enregistrement un nouveau type d'offre</h4>
            </div>
            <div class="card-body">
                <form action="{{ route('admin.store-type-offres2') }}" method="POST" enctype="multipart/form-data">
                    @csrf
                    
                    <div class="mb-3">
                        <label for="name" class="form-label">Intitulé</label>
                        <input type="text" name="name" id="name" class="form-control" required>
                            @error('name')
                                <div class="text-danger">{{ $message }}</div>
                            @enderror
                    </div>
                    <div class="mb-3">
                        <label for="description" class="form-label">Description</label>
                        <textarea name="description" id="description" class="form-control" rows="4" required></textarea>
                        @error('description')
                            <div class="text-danger">{{ $message }}</div>
                        @enderror
                    </div>
                    <button type="submit" class="btn btn-success">Enregistrer</button>
                    <button type="submit" class="btn btn-danger">Annuler</button>
                </form>
                
            </div>
        </div>
    </div>
</section>
@endsection

@section('scripts')
<script>
</script>
@endsection
