<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\QuestionBankDashboardController;
use App\Http\Controllers\QuestionTopicController;
use App\Http\Controllers\QuestionBankController;
use App\Http\Controllers\QuizQuestionBankController;
use App\Http\Controllers\QuizBlueprintController;

Route::get('/question-bank-center', [QuestionBankDashboardController::class, 'index'])
    ->name('question-bank-center');

Route::resource('question-topics', QuestionTopicController::class)
    ->except(['show']);

Route::resource('question-bank', QuestionBankController::class);

Route::get('/quizzes/{quiz}/questions/topics', [QuizQuestionBankController::class, 'topics'])
    ->name('quizzes.questions.topics');

Route::get('/quizzes/{quiz}/select-from-bank', [QuizQuestionBankController::class, 'select'])
    ->name('quizzes.questions.select-from-bank');

Route::post('/quizzes/{quiz}/attach-from-bank', [QuizQuestionBankController::class, 'attach'])
    ->name('quizzes.questions.attach-from-bank');

Route::get('/quizzes/{quiz}/blueprints', [QuizBlueprintController::class, 'index'])
    ->name('quizzes.blueprints.index');

Route::post('/quizzes/{quiz}/blueprints', [QuizBlueprintController::class, 'store'])
    ->name('quizzes.blueprints.store');

Route::delete('/quizzes/{quiz}/blueprints/{blueprint}', [QuizBlueprintController::class, 'destroy'])
    ->name('quizzes.blueprints.destroy');

Route::post('/quizzes/{quiz}/blueprints/generate', [QuizBlueprintController::class, 'generate'])
    ->name('quizzes.blueprints.generate');