@extends('layouts.parent')
@section('title', $case->case_number)
@section('content')
    <x-page-head title="{{ $case->case_number }}" subtitle="{{ $case->subjectStudent?->full_name }}">
        <x-slot:actions><a href="{{ route('parent.cases.index') }}" class="btn btn-outline">Back</a></x-slot:actions>
    </x-page-head>
    @include('cases._show', ['nextStages' => [], 'showOutcomeForm' => false])
    @if (! $case->parent_acknowledged_at)
        <x-panel style="margin-top:16px;">
            <h3 style="margin-bottom:12px;">Acknowledge Notice</h3>
            <form method="POST" action="{{ route('parent.cases.acknowledge', $case) }}">@csrf
                <textarea class="input" name="parent_response" rows="3" placeholder="Optional response or comment"></textarea>
                <button type="submit" class="btn btn-primary" style="margin-top:12px;">Acknowledge</button>
            </form>
        </x-panel>
    @else
        <x-panel style="margin-top:16px;"><x-badge variant="green">Acknowledged</x-badge> {{ optional($case->parent_acknowledged_at)->format('d M Y H:i') }}@if($case->parent_response)<p style="margin-top:8px;">{{ $case->parent_response }}</p>@endif</x-panel>
    @endif
@endsection
