@extends('layouts.tutorly') @section('title', 'Chat with Tutorly - Primary Learning Tutor') @section('content')

@if(request('class_id') && request('subject_id')) @php $class = $classes->find(request('class_id')); $subject = $class ? $class->activeSubjects->find(request('subject_id')) : null; @endphp {{ $class ? $class->name : 'Primary 1' }} - {{ $subject ? $subject->name : 'Mathematics' }} @elseif(request('class_id')) @php $class = $classes->find(request('class_id')); @endphp {{ $class ? $class->name : 'Primary 1' }} - Select a Subject @else Primary 1 - Select a Subject @endif

Let's Get Learning! 🚀

@php $selectedClass = $classes->firstWhere('id', request('class_id')); $selectedSubject = $selectedClass ? $selectedClass->activeSubjects->firstWhere('id', request('subject_id')) : null; $currentSubjectName = $selectedSubject ? $selectedSubject->name : 'Mathematics'; $hasSubject = request('subject_id') ? true : false; $inputPlaceholder = $hasSubject ? "Type your question here... Don't be shy!" : "Please select a subject from the sidebar first"; $disabledAttr = $hasSubject ? '' : 'disabled'; @endphp

Chat with Tutorly

@if($selectedSubject) Got a question about {{ $currentSubjectName }}? I'm all ears! Fire away! 🚀 @else Please select a subject from the sidebar to get started! @endif

💭
1. Quick Start: Ask Tutorly about any topic
- OR -
👋

Welcome to Tutorly!

Select a subject from the sidebar, then ask me any questions or choose a topic to get started!

📺 Educational Videos

@if($selectedSubjectId) Videos related to {{ $classes->firstWhere('id', $selectedClassId)?->name }} - {{ $classes->firstWhere('id', $selectedClassId)?->activeSubjects->firstWhere('id', $selectedSubjectId)?->name }} @else All educational videos @endif

@if($relatedVideos->count() > 0) @else
📺
No videos available

There are no videos available yet. Check back later!

@endif @if($featuredVideos->count() > 0) @endif
@if($selectedClassId)

📄 Past Year Papers

@if($selectedSubjectId) Past papers for {{ $classes->firstWhere('id', $selectedClassId)?->name }} - {{ $classes->firstWhere('id', $selectedClassId)?->activeSubjects->firstWhere('id', $selectedSubjectId)?->name }} @else All past papers for {{ $classes->firstWhere('id', $selectedClassId)?->name }} @endif

@if($pastPapers && $pastPapers->count() > 0)
@foreach($pastPapers as $paper)
📄
⬇️
{{ $paper->title }}
@if($paper->year || $paper->term) @if($paper->year){{ $paper->year }}@endif @if($paper->year && $paper->term) / @endif @if($paper->term){{ $paper->term }}@endif @endif {{ number_format($paper->file_size / 1024, 1) }} KB
@if($paper->description)

{{ Str::limit($paper->description, 100) }}

@endif 📥 Download
@endforeach
@else
📄
No past papers available

There are no past papers available for this selection yet. Check back later!

@endif @else
📄

Past Year Papers

Select a class from the sidebar to view available past year papers!

Access past year exam papers for practice and preparation.

@endif
@if($selectedClassId)

📝 Study Notes

@if($selectedSubjectId) Study notes for {{ $classes->firstWhere('id', $selectedClassId)?->name }} - {{ $classes->firstWhere('id', $selectedClassId)?->activeSubjects->firstWhere('id', $selectedSubjectId)?->name }} @else All study notes for {{ $classes->firstWhere('id', $selectedClassId)?->name }} @endif

@if($studyNotes && $studyNotes->count() > 0)
@foreach($studyNotes as $note)
📝
⬇️
{{ $note->title }}
@if($note->topic) {{ $note->topic }} @endif {{ number_format($note->file_size / 1024, 1) }} KB
@if($note->description)

{{ Str::limit($note->description, 100) }}

@endif 📥 Download
@endforeach
@else
📝
No study notes available

There are no study notes available for this selection yet. Check back later!

@endif @else
📝

Study Notes

Select a class from the sidebar to view available study notes!

Access study notes for your selected subject and topic.

@endif
@endsection @push('scripts') @endpush