@extends('layouts.base')

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

@section('content')
<section class="profile-details bg-light py-5">
    <div class="container">
        <!-- Header -->
        <div class="header d-flex justify-content-between align-items-center mb-4">
            <h1 class="text-primary">Mon Profil</h1>
            <a href="{{ route('etudiants.offres.index') }}" class="btn btn-outline-primary">
                <i class="bi bi-arrow-left"></i> Retour à l'accueil
            </a>
        </div>

        <!-- User Profile Details -->
        <div class="card shadow-sm">
            <div class="card-body ">
                <div class="d-flex align-items-center mb-4">
                    <img src="{{ asset('auth/images/img2.svg') }}" alt="User Avatar" class="rounded-circle me-3" width="80" height="80">
                    <div>
                        <h3 class="card-title">{{ auth()->user()->name }} {{ auth()->user()->surname }}</h3>
                        <p class="text-muted">{{ auth()->user()->email }}</p>
                    </div>
                </div>

                <hr>
                <h2 class="d-flex justify-content-center align-items-center vh-10">Ajoutez une certification</h2>
                <div class="row d-flex justify-content-center align-items-center vh-10">
                
                    <div class="col-md-6">
                    
        @if(session('success'))
            <div class="alert alert-success">{{ session('success') }}</div>
        @endif

        <form action="{{ route('certifications.store') }}" method="POST" enctype="multipart/form-data">
        @csrf
        <div class="mb-3">
            <label for="training_center" class="form-label">Nom du Centre de Formation</label>
            <input type="text" name="training_center" id="training_center" class="form-control" required>
        </div>

        <div class="mb-3">
            <label for="certification_name" class="form-label">Nom de la Certification</label>
            <input type="text" name="certification_name" id="certification_name" class="form-control" required>
        </div>

        <div class="mb-3">
            <label for="field" class="form-label">Domaine</label>
            <input type="text" name="field" id="field" class="form-control">
        </div>

        <div class="mb-3">
            <label for="level" class="form-label">Niveau</label>
            <input type="text" name="level" id="level" class="form-control">
        </div>

        <div class="mb-3">
            <label for="obtained_date" class="form-label">Date d'Obtention</label>
            <input type="date" name="obtained_date" id="obtained_date" class="form-control" required>
        </div>

        <div class="mb-3">
            <label for="validity_duration" class="form-label">Durée de Validité (en mois)</label>
            <input type="number" name="validity_duration" id="validity_duration" class="form-control">
        </div>

        <div class="mb-3">
            <label for="media" class="form-label">Ajouter un Média</label>
            <input type="file" name="media" id="media" class="form-control">
        </div>

        <button type="submit" class="btn btn-primary">Ajouter</button>
    </form>
              
            </div>
        </div>
    </div>
</section>
    
@endsection