@extends('layouts.dashboard') @section('title', 'AI Studio — '.$course->title) @section('page_title', __('AI Studio')) @section('content') @include('partials.how-it-works', ['key' => 'ai.instructor'])
{{ $course->title }}
{{ $limit > 0 ? __(':remaining of :limit AI credits left this month', ['remaining' => $remaining, 'limit' => $limit]) : __('Unlimited AI credits') }} · {{ __('1 credit = 1 generation') }}
{{ __('Curriculum') }} {{ __('Courses') }}
@unless($configured)
{{ __('AI is not configured yet. An administrator needs to add an API key under') }} {{ __('Admin → AI Settings') }}.
@endunless
@if($tab === 'outline')
{{ __('Generate a curriculum') }}

{{ __('Sections and lessons are appended to the course; nothing existing is changed.') }}

@csrf
@elseif($tab === 'import')
{{ __('Build a course from a document') }}

{{ __('Upload a transcript, notes, slide text or a chapter — or paste the text — and the outline is drawn from it rather than invented.') }}

@csrf
{{ __('txt, md, vtt, srt, docx — and pdf when pdftotext is installed on the server.') }}
@elseif($tab === 'subtitles')
{{ __('Translate subtitles') }}

{{ __('Takes the lesson’s existing subtitle track and produces the same file in another language, timings untouched.') }}

@csrf
{{ __('Translates an existing track. To create the first one from the lesson audio, use “Transcribe” in the curriculum (Settings → Transcription).') }}
@elseif($tab === 'quiz')
{{ __('Generate quiz questions') }}
@csrf
@elseif($tab === 'assignment')
{{ __('Design an assignment') }}

{{ __('A practical brief with deliverables and a grading rubric, based on a lesson or a topic.') }}

@csrf
@elseif($tab === 'faqs')
{{ __('Write course FAQs') }}

{{ __('Questions buyers ask before enrolling — shown on the public course page.') }}

@csrf
{{ __('Existing FAQs: :n', ['n' => $course->faqs()->count()]) }} · {{ __('manage') }}
@elseif($tab === 'copy')
{{ __('Marketing & listing copy') }}

{{ __('Titles, descriptions, outcomes, SEO tags, an e-mail blurb and a social post — pick what to apply.') }}

@csrf
@else
{{ __('Draft a lesson') }}
@csrf
@if($course->sections->isEmpty())
{{ __('Add a section first (or generate an outline).') }}
@endif
@endif
@if($preview && ($preview['kind'] ?? null) === $tab) @if($tab === 'outline')
{{ __('Preview') }} — {{ trans_choice(':count section|:count sections', count($preview['data']['sections']), ['count' => count($preview['data']['sections'])]) }}
@csrf
@foreach($preview['data']['sections'] as $i => $s)
{{ $i + 1 }}. {{ $s['title'] }}
{{ $s['description'] ?? '' }}
    @foreach($s['lessons'] ?? [] as $l)
  • {{ $l['type'] ?? 'text' }}{{ $l['title'] }} — {{ $l['summary'] ?? '' }} ({{ __(':count min', ['count' => $l['duration'] ?? 0]) }})
  • @endforeach
@endforeach
@elseif($tab === 'quiz')
@csrf
{{ __('Preview') }} — {{ count($preview['data']) }} {{ __('questions (untick any to skip)') }}
@foreach($preview['data'] as $i => $q)
    @foreach($q['options'] as $o)
  • {{ $o['text'] }}
  • @endforeach
@if(!empty($q['explanation']))
{{ $q['explanation'] }}
@endif
@endforeach
@elseif($tab === 'assignment')
@csrf
{{ __('Preview — assignment') }}
@foreach(['text' => __('Text'), 'file' => __('File'), 'url' => __('Link')] as $t => $l)
@endforeach
@elseif($tab === 'faqs')
@csrf
{{ __('Preview — :n FAQs (untick any to skip)', ['n' => count($preview['data'])]) }}
@foreach($preview['data'] as $i => $f)
{{ $f['answer'] }}
@endforeach
@elseif($tab === 'copy') @php($cp = $preview['data'])
@csrf
{{ __('Preview — tick what to apply to the course') }}
@foreach($cp['titles'] as $i => $t)
@endforeach
@foreach(['short_description' => __('Short description'), 'description' => __('Description'), 'meta_title' => __('SEO title'), 'meta_description' => __('SEO description')] as $k => $l)
{{ $cp[$k] }}
@endforeach @foreach(['outcomes' => __('What learners will learn'), 'requirements' => __('Requirements'), 'target_audience' => __('Who it is for')] as $k => $l)
    @foreach($cp[$k] as $line)
  • {{ $line }}
  • @endforeach
@endforeach
{{ __('E-mail / campaign blurb') }} ({{ __('copy & paste') }})
{{ $cp['promo'] }}
{{ __('Social post') }}
{{ $cp['social'] }}
@else
@csrf
{{ __('Preview — "') }}{{ $preview['title'] }}"
{{ __('Edit freely before adding. Saved as a text lesson.') }}
@endif @else
{{ __('Generated content appears here for review.') }}
{{ __('Nothing is added to the course until you approve it.') }}
@endif
@endsection