"""
Quiz question prompts for the Telegram Quiz Bot.
This module contains the prompts used to generate quiz questions via OpenAI.
"""

# System message for OpenAI
SYSTEM_MESSAGE = "You are a Python programming instructor creating quiz questions. Always respond with valid JSON only."

# Main Python quiz prompt
PYTHON_QUIZ_PROMPT = """Generate a Python programming quiz question with the following format:
{
    "explanation": "A clear, concise explanation of a Python concept (2-3 sentences)",
    "question": "A Python programming question based on the explained concept",
    "options": {
        "A": "First option",
        "B": "Second option", 
        "C": "Third option",
        "D": "Fourth option"
    },
    "correct_answer": "A",
    "explanations": {
        "A": "Explanation for option A",
        "B": "Explanation for option B",
        "C": "Explanation for option C", 
        "D": "Explanation for option D"
    }
}

IMPORTANT FORMATTING RULES:
1. When including Python code in questions, options, or explanations, wrap it with backticks: `code` for inline code or ```python code ``` for code blocks
2. Use proper markdown formatting for code snippets
3. Ensure all code examples are properly formatted and readable
4. Make it an intermediate level Python topic such as data structures, functions, classes, modules, or common Python concepts
5. The explanation should provide context that helps understand the question
6. Include code snippets in the question if relevant
7. Provide detailed explanations for all options with proper code formatting

CRITICAL: Keep answer options SHORT (maximum 25-30 characters each) to fit properly in Telegram buttons. Use concise phrases, single words, or short code snippets only. For example:
- Good: "True", "False", "TypeError", "list[0]", "[1, 2, 3]"
- Bad: "This will raise a TypeError because...", "The result is a list containing..."

The explanations can be detailed, but the options themselves must be brief."""

# Alternative prompts for different difficulty levels or topics
BEGINNER_PYTHON_PROMPT = """Generate a beginner-level Python programming quiz question with the same JSON format as above. Focus on basic syntax, variables, simple data types, and fundamental concepts. Make it accessible for someone just starting to learn Python."""

ADVANCED_PYTHON_PROMPT = """Generate an advanced Python programming quiz question with the same JSON format as above. Focus on complex topics like decorators, metaclasses, async programming, advanced data structures, or performance optimization. Include challenging code examples."""

# Topic-specific prompts
DATA_STRUCTURES_PROMPT = """Generate a Python quiz question specifically about data structures (lists, dictionaries, tuples, sets) with the same JSON format. Include practical examples and edge cases."""

OOP_PYTHON_PROMPT = """Generate a Python quiz question about Object-Oriented Programming concepts (classes, inheritance, polymorphism, encapsulation) with the same JSON format. Include code examples demonstrating OOP principles."""
