package com.pharmacopoeia.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/api/v1/exam/practice")
public class ExamPracticeController {

    @GetMapping("/questions")
    public ResponseEntity<Map<String, Object>> getQuestions(
            @RequestParam(required = false) String subject,
            @RequestParam(required = false) String chapterId,
            @RequestParam(required = false) String questionType,
            @RequestParam(defaultValue = "sequential") String mode,
            @RequestParam(defaultValue = "10") int count) {
        return ResponseEntity.ok(Map.of(
                "questions", List.of(),
                "message", "待题库生成后可用"
        ));
    }

    @PostMapping("/submit")
    public ResponseEntity<Map<String, Object>> submitAnswer(@RequestBody Map<String, String> req) {
        return ResponseEntity.ok(Map.of(
                "correct", true,
                "correct_answer", "",
                "explanation", ""
        ));
    }

    @GetMapping("/wrong-questions")
    public ResponseEntity<Map<String, Object>> getWrongQuestions() {
        return ResponseEntity.ok(Map.of("items", List.of()));
    }
}
