@extends('admin.layout')

@section('title', 'Nouveau temoignage')

@section('content')
    <h1>Nouveau temoignage</h1>
    <p class="muted">Sera visible dans le carrousel de la page d'accueil si publie.</p>

    @if($errors->any())
        <div style="background:#fee2e2;color:#991b1b;padding:12px 16px;border-radius:10px;margin-bottom:16px;font-size:14px;">
            {{ $errors->first() }}
        </div>
    @endif

    <div class="card">
        <form method="post" action="{{ route('admin.testimonials.store') }}" enctype="multipart/form-data">
            @csrf
            @include('admin.testimonials._form', ['testimonial' => $testimonial])
            <button type="submit" class="btn">Enregistrer</button>
            <a href="{{ route('admin.testimonials.index') }}" style="margin-left:12px;">Annuler</a>
        </form>
    </div>
@endsection
