@extends('layouts.app')

@section('title', 'Lesson Plan Details | Curriculum')

@section('sidebar-menu')
    @include('teacher.partials.sidebar')
@endsection

@section('breadcrumb')
    <span><a href="{{ route('teacher.dashboard') }}">Home</a></span> / 
    <span><a href="{{ route('teacher.curriculum.index') }}">Curriculum</a></span> / 
    <span class="active-page">Lesson Details</span>
@endsection

@section('content')
<div class="row justify-content-center">
    <div class="col-md-8">
        <div class="card shadow-sm">
            <div class="card-header d-flex justify-content-between align-items-center">
                <span>📖 {{ $curriculum->title }}</span>
                @if($curriculum->status == 'completed')
                    <span class="badge bg-success">Completed</span>
                @else
                    <span class="badge bg-warning text-dark">Pending</span>
                @endif
            </div>
            <div class="card-body">
                <div class="mb-4">
                    <h5 class="text-primary mb-3">Overview</h5>
                    <div class="row">
                        <div class="col-sm-4 text-muted">Class:</div>
                        <div class="col-sm-8 fw-bold">{{ $curriculum->schoolClass->name ?? 'N/A' }}</div>
                    </div>
                    <div class="row mt-2">
                        <div class="col-sm-4 text-muted">Subject:</div>
                        <div class="col-sm-8 fw-bold">{{ $curriculum->subject->name ?? 'N/A' }}</div>
                    </div>
                    <div class="row mt-2">
                        <div class="col-sm-4 text-muted">Target Date:</div>
                        <div class="col-sm-8 fw-bold">{{ \Carbon\Carbon::parse($curriculum->date)->format('l, F j, Y') }}</div>
                    </div>
                </div>

                <hr>

                <div class="mb-3">
                    <h5 class="text-primary mb-3">Description / Objectives</h5>
                    <div class="p-3 bg-light rounded" style="white-space: pre-line;">{{ $curriculum->description ?? 'No description provided.' }}</div>
                </div>

                <div class="text-end mt-4">
                    <a href="{{ route('teacher.curriculum.index') }}" class="btn btn-secondary">Back to Curriculum</a>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
