#!/usr/bin/env python3
"""
Week 19 Generator - Nouns Deep Dive

Uses the shared module system (monday.py, tuesday.py, wednesday.py, thursday.py, friday.py, teacher_guide.py).

Topic: Nouns Deep Dive - Common, Proper, Compound, Collective nouns
Words: mailbox, sunshine, classroom, butterfly, playground, toothbrush, rooftop, rainbow, teacher, mountain, Saturday, January
Pattern: Compound nouns, proper nouns, common nouns
"""
import os
import sys

# Add course root to path so we can import shared modules
COURSE_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, COURSE_ROOT)

from monday import generate_monday
from tuesday import generate_tuesday
from wednesday import generate_wednesday
from thursday import generate_thursday
from friday import generate_friday
from teacher_guide import generate_teacher_guide

# =====================================================================
# WEEK 19 DATA
# =====================================================================

WEEK = os.path.join(COURSE_ROOT, "Week_19")
PHONICS_LABEL = "Nouns Deep Dive"

# 4-tuple: (word, pattern_code, phonics_note, context_definition)
WORDS = [
    ("mailbox", "compound", "compound noun: mail + box", "a box where mail is delivered"),
    ("sunshine", "compound", "compound noun: sun + shine", "warm light from the sun"),
    ("classroom", "compound", "compound noun: class + room", "a room where students learn"),
    ("butterfly", "compound", "compound noun: butter + fly", "a beautiful insect with colorful wings"),
    ("playground", "compound", "compound noun: play + ground", "a place where children play outside"),
    ("toothbrush", "compound", "compound noun: tooth + brush", "a brush used to clean your teeth"),
    ("rooftop", "compound", "compound noun: roof + top", "the top surface of a building roof"),
    ("rainbow", "compound", "compound noun: rain + bow", "a colorful arc in the sky after rain"),
    ("teacher", "common", "common noun - a person", "a person who helps students learn"),
    ("mountain", "common", "common noun - a thing", "a very large hill that rises high above the land"),
    ("Saturday", "proper", "proper noun - always capitalized", "a day of the week (always starts with a capital letter)"),
    ("January", "proper", "proper noun - always capitalized", "the first month of the year (always starts with a capital letter)"),
]

LEARNING_SKILLS_MON = [
    "Identify compound nouns as two words joined together",
    "Recognize proper nouns and know they are always capitalized",
    "Distinguish between common nouns and proper nouns",
]

LEARNING_SKILLS_TUE = [
    "Sort nouns into categories: common, proper, and compound",
    "Build compound nouns from smaller words",
    "Practice spelling compound nouns correctly",
]

LEARNING_SKILLS_WED = [
    "Identify collective nouns (groups of people or things)",
    "Use context clues to identify noun types in sentences",
    "Connect nouns to their categories through word webs",
]

LEARNING_SKILLS_THU = [
    "Write sentences using different types of nouns",
    "Find and classify nouns in reading passages",
    "Apply noun knowledge in original writing",
]

LEARNING_SKILLS_FRI = [
    "Demonstrate knowledge of all 12 spelling words",
    "Correctly identify noun types: common, proper, compound, collective",
    "Use nouns accurately in writing",
]

# =====================================================================
# MONDAY DATA
# =====================================================================

LEARNING_TEXT_MON = (
    "Nouns are words that name people, places, things, and ideas. "
    "Compound nouns are two words joined together to make one new meaning, like mail + box = mailbox. "
    "Proper nouns name specific people, places, or things and always start with a capital letter, like Saturday and January. "
    "Common nouns name general things and do not need capitals, like teacher and mountain."
)

VOWEL_EXAMPLES = [
    "mailbox = mail + box",
    "sunshine = sun + shine",
    "classroom = class + room",
    "butterfly = butter + fly",
    "playground = play + ground",
]

GRAMMAR_NOTE = "Nouns name people, places, things, and ideas."

GRAMMAR_DEEP = (
    "Types of nouns:\n"
    "1. Common nouns - general names (teacher, mountain, garden)\n"
    "2. Proper nouns - specific names, always capitalized (Saturday, January, America)\n"
    "3. Compound nouns - two words joined to make one meaning (mailbox, butterfly, playground)\n"
    "4. Collective nouns - words for groups (team, flock, bunch)"
)

# Noun identification sentences for Monday
MONDAY_CONTEXT_CLUE_SENTENCES = []

# Noun type sort
MONDAY_CONTEXT_CLUE_SORT = {}

MONDAY_GRAMMAR_PRACTICE = [
    ("The __________ is where we get our letters.", "mailbox"),
    ("The __________ flew over the garden.", "butterfly"),
]

MONDAY_STORY = (
    "On a bright Saturday morning, the teacher took the class outside from their classroom. "
    "The sunshine warmed their faces as they ran to the playground. "
    "A butterfly landed on Maya's nose. After recess, they climbed a small mountain behind the school. "
    "From the rooftop of the mountain, they saw a rainbow over the valley. "
    "In January, they will visit again and check the old mailbox at the trailhead. "
    "The teacher said the toothbrush they found near the stream must belong to a campervan driver!"
)

MONDAY_SORT_LABELS = ["Compound", "Other"]
TEACHER_MONDAY_SORT_ANSWERS = {
    "Compound": ["mailbox", "sunshine", "classroom", "butterfly", "playground", "toothbrush", "rooftop", "rainbow"],
    "Other": ["teacher", "mountain", "Saturday", "January"],
}

MONDAY_FILL_DATA = [
    ("The children waited excitedly by the __________.", "mailbox"),
    ("A colorful __________ fluttered through the garden.", "butterfly"),
    ("We always have fun on the school __________.", "playground"),
]

MONDAY_OPPOSITE_WORDS = []
TEACHER_MONDAY_OPPOSITE_ANSWERS = []

MONDAY_SENTENCE_WORDS = ["mailbox", "sunshine", "butterfly", "playground", "teacher", "Saturday"]

# =====================================================================
# TUESDAY DATA
# =====================================================================

TUESDAY_LEARNING = (
    "Compound nouns combine two smaller words to create one new meaning. "
    "A mailbox is not just a box - it is a special box for mail. "
    "A butterfly is not just a fly - it is a special insect. "
    "Today we will practice building and identifying compound nouns, and sorting all our noun types."
)

TUESDAY_READING = (
    "Every day at school uses nouns in special ways. Our classroom is on the second floor. "
    "The teacher writes the date on the board - January 15, Saturday of reading week. "
    "After lunch, we run to the playground in the sunshine. Sometimes a butterfly visits our lunch table. "
    "We always brush our teeth with our toothbrush before we leave. "
    "On the way home, we check the mailbox and look at the rooftop where the sparrows nest. "
    "After the rain, we love to see a rainbow over the mountain in the distance."
)

TUESDAY_COMP_QUESTIONS = [
    "Name three compound nouns from the passage.",
    "Which proper nouns appear in the passage?",
    "What is the difference between a common noun and a proper noun?",
    "What two words make up the compound noun playground?",
]

TEACHER_TUESDAY_COMP_ANSWERS = [
    "Any three of: classroom, playground, sunshine, butterfly, toothbrush, mailbox, rooftop, rainbow",
    "January, Saturday",
    "Common nouns name general things (teacher, mountain). Proper nouns name specific things and are always capitalized (January, Saturday).",
    "play + ground",
]

TUESDAY_SCRAMBLE_WORDS = ["playground", "classroom", "mailbox", "toothbrush"]
TEACHER_TUESDAY_SCRAMBLE_ANSWERS = [
    ("roundgaylp", "playground"),
    ("roomclass", "classroom"),
    ("boxmail", "mailbox"),
    ("brushtooh", "toothbrush"),
]

TUESDAY_REMEMBER_BOXES = [
    ("Noun Types",
     "Common nouns name general things (teacher, garden). "
     "Proper nouns name specific things and are always capitalized (Saturday, January). "
     "Compound nouns combine two words into one meaning (mailbox, butterfly)."),
]

# Compound building example: (compound_word, [part1, part2])
TUESDAY_PARAGRAPH_EXAMPLE = (
    "Nouns are words that name people, places, things, and ideas.",
    "Compound nouns join two words like mailbox and butterfly. Proper nouns are always capitalized like Saturday and January. Common nouns are general names like teacher and mountain.",
    "Knowing your noun types helps you write clearly!",
)

TUESDAY_PATTERN_HUNT_WORDS = [
    "mailbox", "sunshine", "classroom", "butterfly",
    "playground", "toothbrush", "rooftop", "rainbow",
    "teacher", "mountain", "Saturday", "January",
    "quickly", "beautiful", "happily", "gentle", "brave", "small",
]

TEACHER_TUESDAY_PATTERN_HUNT = {
    "match": ["mailbox", "sunshine", "classroom", "butterfly", "playground", "toothbrush", "rooftop", "rainbow", "teacher", "mountain", "Saturday", "January"],
}

TUESDAY_SWAP_DATA = [
    (
        "The butterfly flew to the playground.",
        ("butterfly", "rainbow"),
        ("playground", "mountain"),
    ),
    (
        "The teacher smiled on Saturday morning.",
        ("teacher", "classroom"),
        ("Saturday", "January"),
    ),
]

TUESDAY_BUILDER_PROMPTS = [
    ("Write about a sunny day at the playground", "playground"),
    ("Write about visiting a mountain on Saturday", "mountain"),
]

# =====================================================================
# WEDNESDAY DATA
# =====================================================================

WEDNESDAY_LEARNING = (
    "Collective nouns name groups of people or things - like a team, a flock, or a bunch. "
    "Today we will learn to identify all noun types in sentences and connect them in word webs. "
    "We will also practice using context clues to figure out what type of noun a word is."
)

WEDNESDAY_READING = (
    "The teacher gathered the class on the playground for a special lesson. "
    "It was a bright Saturday in January, and the sunshine felt wonderful. "
    "A team of butterflies flew over the garden. The collective noun for butterflies is a kaleidoscope. "
    "A flock of birds sat on the rooftop. The teacher pointed to the mountain in the distance "
    "and explained that a mountain range is a collective noun for many mountains. "
    "After the lesson, each student checked their mailbox for a surprise note from the teacher."
)

WEDNESDAY_VOCAB_Q = (
    "In the passage, what does “kaleidoscope” mean? "
    "Point to the context clue that helped you figure it out."
)

TEACHER_WEDNESDAY_VOCAB_Q_QUESTION = WEDNESDAY_VOCAB_Q
TEACHER_WEDNESDAY_VOCAB_Q_ANSWER = (
    "Kaleidoscope = a group or collection of butterflies. "
    "Clue: 'A team of butterflies flew over the garden. The collective noun for butterflies is a kaleidoscope.' "
    "The sentence directly states it is a collective noun for butterflies."
)

WEDNESDAY_SYN_ANT = ["mailbox", "sunshine", "playground", "butterfly", "mountain", "rainbow"]

WEDNESDAY_WORD_WEB_CENTER = "Nouns"
WEDNESDAY_WORD_WEB_INSTRUCTION = (
    "Write 4 types or examples of nouns connected to 'Nouns.' "
    "Examples: common, proper, compound, collective."
)

WEDNESDAY_SORT_DATA = [
    "The butterfly is a compound noun made of two smaller words",
    "Saturday is a proper noun and always capitalized",
]

TEACHER_WEDNESDAY_SORT_ANSWERS = {
    "sentences": [
        "noun The of two smaller words butterfly is compound made a",
        "is Saturday a noun proper capitalized always and",
    ],
    "correct_order": [
        "The butterfly is a compound noun made of two smaller words.",
        "Saturday is a proper noun and always capitalized.",
    ],
}

WEDNESDAY_CORRECT = [
    "the teacher went to the mountain",
    "saturday is my favorite day",
    "january has thirty one days",
]

TEACHER_WEDNESDAY_CORRECT_ANSWERS = [
    ("the teacher went to the mountain", "The teacher went to the mountain."),
    ("saturday is my favorite day", "Saturday is my favorite day."),
    ("january has thirty one days", "January has thirty one days."),
]

WEDNESDAY_FILL = [
    ("The __________ is a compound noun for mail + box.", "mailbox"),
    ("We play games on the school __________.", "playground"),
    ("A __________ is an insect with colorful wings.", "butterfly"),
]

TEACHER_WEDNESDAY_FILL_ANSWERS = ["mailbox", "playground", "butterfly"]

# Noun type detective: sentences where student identifies the noun type
WEDNESDAY_NOUN_DETECTIVE = [
    "The mailbox holds our letters.",
    "We love the warm sunshine.",
    "Our classroom is very big.",
    "A butterfly landed on the flower.",
    "The playground has swings.",
    "I use my toothbrush every day.",
    "Cats like sleeping on the rooftop.",
    "I saw a rainbow after the storm.",
    "My teacher is very kind.",
    "We climbed the mountain all day.",
    "We visit on Saturday mornings.",
    "January is my favorite month.",
]

TEACHER_WEDNESDAY_DETECTIVE_ANSWERS = [
    ("The mailbox holds our letters.", "Compound"),
    ("We love the warm sunshine.", "Compound"),
    ("Our classroom is very big.", "Compound"),
    ("A butterfly landed on the flower.", "Compound"),
    ("The playground has swings.", "Compound"),
    ("I use my toothbrush every day.", "Compound"),
    ("Cats like sleeping on the rooftop.", "Compound"),
    ("I saw a rainbow after the storm.", "Compound"),
    ("My teacher is very kind.", "Common"),
    ("We climbed the mountain all day.", "Common"),
    ("We visit on Saturday mornings.", "Proper"),
    ("January is my favorite month.", "Proper"),
]

# Noun identification in paragraph
WEDNESDAY_PARAGRAPH_LABEL_DATA = [
    "Nouns are words that name people, places, things, and ideas.",
    "Common nouns are general names like teacher and mountain.",
    "Proper nouns are specific and always capitalized like Saturday.",
    "Compound nouns combine two words like mailbox and butterfly.",
    "Collective nouns name groups like team and flock.",
    "Knowing your nouns helps you become a better writer.",
]

TEACHER_WEDNESDAY_PARAGRAPH_LABEL_ANSWERS = [
    ("Nouns are words that name people, places, things, and ideas.", "T"),
    ("Common nouns are general names like teacher and mountain.", "D"),
    ("Proper nouns are specific and always capitalized like Saturday.", "D"),
    ("Compound nouns combine two words like mailbox and butterfly.", "D"),
    ("Collective nouns name groups like team and flock.", "D"),
    ("Knowing your nouns helps you become a better writer.", "C"),
]

# =====================================================================
# THURSDAY DATA
# =====================================================================

THURSDAY_LEARNING = (
    "Today you will use all your noun knowledge. Write sentences with compound nouns, "
    "capitalize proper nouns correctly, and identify different noun types in reading passages."
)

REMINDER_TEXT = (
    "Noun Types: Common (general names), Proper (specific, capitalized), "
    "Compound (two words joined), Collective (groups). "
    "Remember: proper nouns are ALWAYS capitalized!"
)

THURSDAY_STORY = (
    "It was the first Saturday of January, and the sunshine was warm. "
    "The teacher led the students from their classroom to the playground for a nature walk. "
    "They spotted a butterfly near the old mailbox at the trail entrance. "
    "From the rooftop of the school, you could see the whole mountain range. "
    "After a light rain, a rainbow appeared over the valley. "
    "The teacher said, 'Always remember to use your toothbrush and enjoy the sunshine!'"
)

THURSDAY_COMP_QUESTIONS = [
    "What day and month is mentioned in the story?",
    "Name four compound nouns from the passage.",
    "What is the proper noun rule about capitalization?",
    "Where did the butterfly appear in the story?",
]

TEACHER_THURSDAY_COMP_ANSWERS = [
    "Saturday and January.",
    "Any four of: sunshine, playground, butterfly, mailbox, rooftop, mountain, rainbow, toothbrush",
    "Proper nouns are always capitalized.",
    "The butterfly appeared near the old mailbox at the trail entrance.",
]

THURSDAY_SORT_DATA = [
    "Compound nouns are made by joining two words together",
    "Proper nouns always begin with a capital letter",
]

TEACHER_THURSDAY_SORT_ANSWERS = {
    "sentences": [
        "nouns Compound two are by joining words together made",
        "Proper nouns always begin with a capital letter",
    ],
    "correct_order": [
        "Compound nouns are made by joining two words together.",
        "Proper nouns always begin with a capital letter.",
    ],
}

THURSDAY_DETECTIVE = ["mailbx", "sunshne", "classrom", "buttfrly", "playgroun", "toothrus",
                       "rooftop", "rainbo", "techer", "muntain", "Satrday", "Janury"]

TEACHER_THURSDAY_DETECTIVE_ANSWERS = [
    ("mailbx", "mailbox"), ("sunshne", "sunshine"), ("classrom", "classroom"),
    ("buttfrly", "butterfly"), ("playgroun", "playground"), ("toothrus", "toothbrush"),
    ("rooftop", "rooftop"), ("rainbo", "rainbow"), ("techer", "teacher"),
    ("muntain", "mountain"), ("Satrday", "Saturday"), ("Janury", "January"),
]

THURSDAY_SWAP_DATA = [
    (
        "The butterfly visited the playground after the rain.",
        ("butterfly", "rainbow"),
        ("playground", "rooftop"),
    ),
    (
        "The teacher smiled on a sunny Saturday morning.",
        ("teacher", "mountain"),
        ("Saturday", "January"),
    ),
]

TEACHER_THURSDAY_SWAP_ANSWERS = [
    "rainbow, rooftop",
    "mountain, January",
]

THURSDAY_MAP_WORD = "playground"

TEACHER_THURSDAY_MAP_SUGGESTIONS = [
    "Meaning: a place where children play outside",
    "Type: compound noun (play + ground)",
    "Example: The playground has swings, slides, and a merry-go-round.",
]

# Noun writing practice words
THURSDAY_CONTEXT_CLUE_WRITING = ["mailbox", "butterfly"]

# Fix paragraph - body text (missing topic and conclusion)
THURSDAY_FIX_PARAGRAPH = ""

TEACHER_THURSDAY_FIX_TOPIC = "Nouns are words that name people, places, things, and ideas."
TEACHER_THURSDAY_FIX_CONCLUSION = "Knowing your noun types helps you write clearly and correctly!"

THURSDAY_PARA_PROMPTS = [
    "Write a paragraph about your favorite playground. Use at least 3 compound nouns.",
]

THURSDAY_STORY_PROMPT = "Write a story using at least 5 spelling words. Make sure to capitalize proper nouns!"

# =====================================================================
# FRIDAY DATA
# =====================================================================

FRIDAY_REVIEW_STORY = (
    "On a sunny Saturday in January, the teacher took us to the playground. "
    "The sunshine was warm and a butterfly landed on my shoulder. "
    "We ran past the old mailbox and climbed to the rooftop. "
    "From the top, we could see the mountain and a rainbow in the sky. "
    "After our adventure, the teacher reminded us to use our toothbrush before dinner. "
    "Our classroom was waiting for us when we returned."
)

FRIDAY_STORY_QUESTIONS = [
    "What day and month does the story take place?",
    "Name three compound nouns from the story.",
    "Why are Saturday and January written with capital letters?",
]

TEACHER_FRIDAY_STORY_ANSWERS = [
    "Saturday and January.",
    "Any three of: sunshine, playground, butterfly, mailbox, rooftop, mountain, rainbow, toothbrush, classroom",
    "They are proper nouns, and proper nouns are always capitalized.",
]

FRIDAY_OPPOSITE_WORDS = ["teacher", "mountain", "mailbox", "butterfly"]

TEACHER_FRIDAY_OPPOSITE_ANSWERS = [
    ("teacher", "student"),
    ("mountain", "valley"),
    ("mailbox", "post office"),
    ("butterfly", "caterpillar"),
]

FRIDAY_BUILDER_WORDS = ["mailbox", "playground", "Saturday"]
FRIDAY_JOURNAL_WORDS = ["sunshine", "butterfly", "January"]

# Noun type quiz: (sentence, answer_type)
FRIDAY_GUESS_MEANING = []

TEACHER_FRIDAY_GUESS_ANSWERS = [
    ("mailbox", "mail + box"),
    ("playground", "play + ground"),
    ("Saturday", "day of the week"),
    ("January", "month of the year"),
]

# Noun identification review text
FRIDAY_PARAGRAPH_PARTS_REVIEW = ""

TEACHER_FRIDAY_PARAGRAPH_ANSWERS = {
    "topic": "Nouns are one of the most important word types in English.",
    "details": [
        "Common nouns name general things, and proper nouns name specific things.",
        "Compound nouns combine two words to create a new meaning.",
        "Collective nouns name groups of people or things.",
    ],
    "conclusion": "When you understand all four types, your reading and writing will improve greatly.",
}

# =====================================================================
# TEACHER GUIDE DATA
# =====================================================================

TEACHER_MONDAY_PHONICS_EXPLANATION = (
    "Students learn 12 spelling words focused on nouns. Eight are compound nouns "
    "(mailbox, sunshine, classroom, butterfly, playground, toothbrush, rooftop, rainbow), "
    "two are common nouns (teacher, mountain), and two are proper nouns (Saturday, January). "
    "Compound nouns are introduced as two words joined together to create one new meaning."
)

TEACHER_MONDAY_GRAMMAR_FOCUS = "Nouns - Common, Proper, Compound, Collective"

TEACHER_MONDAY_GRAMMAR_EXPLANATION = (
    "Four types of nouns:\n"
    "1. Common nouns - general names (teacher, mountain)\n"
    "2. Proper nouns - specific names, always capitalized (Saturday, January)\n"
    "3. Compound nouns - two words joined to make one meaning (mailbox, butterfly)\n"
    "4. Collective nouns - words for groups (team, flock, bunch)\n"
    "Key rule: proper nouns are ALWAYS capitalized, common nouns are not."
)

TEACHER_MONDAY_SENTENCE_WORDS = MONDAY_SENTENCE_WORDS

TEACHER_TUESDAY_PHONICS_EXPLANATION = (
    "Students practice sorting nouns into compound, common, and proper categories. "
    "They build compound nouns from smaller words and practice identifying noun types in reading."
)

TEACHER_WEDNESDAY_PHONICS_EXPLANATION = (
    "Students learn about collective nouns as a fourth type and practice identifying noun types "
    "in context. They classify each spelling word by noun type."
)

TEACHER_WEDNESDAY_DICTATION_WORDS = ["mailbox", "sunshine", "butterfly", "playground", "Saturday", "January"]

TEACHER_THURSDAY_PHONICS_EXPLANATION = (
    "Students apply all noun types in writing. They write sentences using compound nouns, "
    "capitalize proper nouns correctly, and identify nouns in reading passages."
)

TEACHER_FRIDAY_PHONICS_EXPLANATION = (
    "Assessment day. Students demonstrate understanding of all noun types through spelling, "
    "reading comprehension, and classification exercises."
)

# =====================================================================
# GENERATION
# =====================================================================

def generate(week_dir=None, week_num=19):
    if week_dir is None:
        week_dir = WEEK

    # Modules expect 3-tuples; our data has 4. Strip the 4th element.
    W3 = [(w, p, n) for w, p, n, _ in WORDS]

    # Monday
    generate_monday(
        week_dir=week_dir,
        week_num=week_num,
        phonics_label=PHONICS_LABEL,
        words=W3,
        learning_text=LEARNING_TEXT_MON,
        vowel_examples=VOWEL_EXAMPLES,
        grammar_note=GRAMMAR_NOTE,
        grammar_deep=GRAMMAR_DEEP,
        grammar_practice=MONDAY_GRAMMAR_PRACTICE,
        story_text=MONDAY_STORY,
        sort_labels=MONDAY_SORT_LABELS,
        sort_title="Noun Type Sort",
        fill_data=MONDAY_FILL_DATA,
        opposite_words=MONDAY_OPPOSITE_WORDS,
        sentence_words=MONDAY_SENTENCE_WORDS,
        learning_skills=LEARNING_SKILLS_MON,
        context_clue_sentences=MONDAY_CONTEXT_CLUE_SENTENCES,
        context_clue_sort=MONDAY_CONTEXT_CLUE_SORT,
    )

    # Tuesday
    generate_tuesday(
        week_dir=week_dir,
        week_num=week_num,
        phonics_label=PHONICS_LABEL,
        words=W3,
        learning_text=TUESDAY_LEARNING,
        vowel_examples=VOWEL_EXAMPLES,
        reading_text=TUESDAY_READING,
        comp_questions=TUESDAY_COMP_QUESTIONS,
        remember_boxes=TUESDAY_REMEMBER_BOXES,
        scramble_words=TUESDAY_SCRAMBLE_WORDS,
        pattern_hunt_words=TUESDAY_PATTERN_HUNT_WORDS,
        swap_data=TUESDAY_SWAP_DATA,
        builder_prompts=TUESDAY_BUILDER_PROMPTS,
        paragraph_example=TUESDAY_PARAGRAPH_EXAMPLE,
    )

    # Wednesday
    generate_wednesday(
        week_dir=week_dir,
        week_num=week_num,
        phonics_label=PHONICS_LABEL,
        words=W3,
        learning_text=WEDNESDAY_LEARNING,
        learning_skills=LEARNING_SKILLS_WED,
        reading_passage=WEDNESDAY_READING,
        vocab_question=WEDNESDAY_VOCAB_Q,
        syn_ant_words=WEDNESDAY_SYN_ANT,
        word_web_center=WEDNESDAY_WORD_WEB_CENTER,
        word_web_instruction=WEDNESDAY_WORD_WEB_INSTRUCTION,
        sentence_sort_data=WEDNESDAY_SORT_DATA,
        correct_sentences=WEDNESDAY_CORRECT,
        fill_data=WEDNESDAY_FILL,
        context_clue_detective=[],
        paragraph_label_data=WEDNESDAY_PARAGRAPH_LABEL_DATA,
    )

    # Thursday
    generate_thursday(
        week_dir=week_dir,
        week_num=week_num,
        phonics_label=PHONICS_LABEL,
        words=W3,
        learning_text=THURSDAY_LEARNING,
        remember_text=REMINDER_TEXT,
        story_text=THURSDAY_STORY,
        comp_questions=THURSDAY_COMP_QUESTIONS,
        sentence_sort_data=THURSDAY_SORT_DATA,
        detective_words=THURSDAY_DETECTIVE,
        swap_data=THURSDAY_SWAP_DATA,
        map_word=THURSDAY_MAP_WORD,
        para_prompts=THURSDAY_PARA_PROMPTS,
        story_prompt=THURSDAY_STORY_PROMPT,
        context_clue_writing=THURSDAY_CONTEXT_CLUE_WRITING,
        fix_paragraph=THURSDAY_FIX_PARAGRAPH,
    )

    # Friday
    generate_friday(
        week_dir=week_dir,
        week_num=week_num,
        phonics_label=PHONICS_LABEL,
        words=W3,
        review_story=FRIDAY_REVIEW_STORY,
        story_questions=FRIDAY_STORY_QUESTIONS,
        opposite_words=FRIDAY_OPPOSITE_WORDS,
        builder_words=FRIDAY_BUILDER_WORDS,
        journal_words=FRIDAY_JOURNAL_WORDS,
        guess_meaning=FRIDAY_GUESS_MEANING,
        paragraph_parts_review=FRIDAY_PARAGRAPH_PARTS_REVIEW,
    )

    # Teacher Guide -- use full 4-tuple WORDS
    generate_teacher_guide(
        week_dir=week_dir,
        week_num=week_num,
        phonics_label=PHONICS_LABEL,
        words=WORDS,
        # Monday
        monday_phonics_explanation=TEACHER_MONDAY_PHONICS_EXPLANATION,
        monday_grammar_focus=TEACHER_MONDAY_GRAMMAR_FOCUS,
        monday_grammar_explanation=TEACHER_MONDAY_GRAMMAR_EXPLANATION,
        monday_story_text=MONDAY_STORY,
        monday_sort_labels=MONDAY_SORT_LABELS,
        monday_sort_answers=[
            TEACHER_MONDAY_SORT_ANSWERS.get(label, [])
            for label in MONDAY_SORT_LABELS
        ],
        monday_fill_answers=["mailbox", "butterfly", "playground"],
        monday_opposite_answers=TEACHER_MONDAY_OPPOSITE_ANSWERS,
        monday_sentence_words=MONDAY_SENTENCE_WORDS,
        monday_context_clue_answers=[
            (sentence, word) for sentence, word in MONDAY_CONTEXT_CLUE_SENTENCES
        ],
        # Tuesday
        tuesday_phonics_explanation=TEACHER_TUESDAY_PHONICS_EXPLANATION,
        tuesday_scramble_answers=TEACHER_TUESDAY_SCRAMBLE_ANSWERS,
        tuesday_comp_questions=TUESDAY_COMP_QUESTIONS,
        tuesday_comp_answers=TEACHER_TUESDAY_COMP_ANSWERS,
        tuesday_pattern_hunt_answers=TEACHER_TUESDAY_PATTERN_HUNT,
        tuesday_swap_answers=TEACHER_THURSDAY_SWAP_ANSWERS,
        tuesday_builder_prompts=TUESDAY_BUILDER_PROMPTS,
        tuesday_paragraph_example=TUESDAY_PARAGRAPH_EXAMPLE,
        # Wednesday
        wednesday_phonics_explanation=TEACHER_WEDNESDAY_PHONICS_EXPLANATION,
        wednesday_vocab_q_question=TEACHER_WEDNESDAY_VOCAB_Q_QUESTION,
        wednesday_vocab_q_answer=TEACHER_WEDNESDAY_VOCAB_Q_ANSWER,
        wednesday_syn_ant_words=WEDNESDAY_SYN_ANT,
        wednesday_word_web_center=WEDNESDAY_WORD_WEB_CENTER,
        wednesday_word_web_suggestions=[
            "Common", "Proper", "Compound", "Collective",
            "mailbox", "Saturday", "butterfly", "team",
        ],
        wednesday_sort_answers=TEACHER_WEDNESDAY_SORT_ANSWERS,
        wednesday_correct_answers=TEACHER_WEDNESDAY_CORRECT_ANSWERS,
        wednesday_fill_answers=TEACHER_WEDNESDAY_FILL_ANSWERS,
        wednesday_context_clue_question=TEACHER_WEDNESDAY_VOCAB_Q_QUESTION,
        wednesday_context_clue_answer=TEACHER_WEDNESDAY_VOCAB_Q_ANSWER,
        wednesday_dictation_words=TEACHER_WEDNESDAY_DICTATION_WORDS,
        wednesday_context_clue_detective_answers=TEACHER_WEDNESDAY_DETECTIVE_ANSWERS,
        wednesday_paragraph_label_answers=TEACHER_WEDNESDAY_PARAGRAPH_LABEL_ANSWERS,
        # Thursday
        thursday_phonics_explanation=TEACHER_THURSDAY_PHONICS_EXPLANATION,
        thursday_comp_questions=THURSDAY_COMP_QUESTIONS,
        thursday_comp_answers=TEACHER_THURSDAY_COMP_ANSWERS,
        thursday_sort_answers=TEACHER_THURSDAY_SORT_ANSWERS,
        thursday_detective_answers=TEACHER_THURSDAY_DETECTIVE_ANSWERS,
        thursday_swap_answers=TEACHER_THURSDAY_SWAP_ANSWERS,
        thursday_map_word=THURSDAY_MAP_WORD,
        thursday_map_suggestions=TEACHER_THURSDAY_MAP_SUGGESTIONS,
        # Friday
        friday_phonics_explanation=TEACHER_FRIDAY_PHONICS_EXPLANATION,
        friday_story_questions=FRIDAY_STORY_QUESTIONS,
        friday_story_answers=TEACHER_FRIDAY_STORY_ANSWERS,
        friday_opposite_answers=TEACHER_FRIDAY_OPPOSITE_ANSWERS,
        friday_guess_answers=TEACHER_FRIDAY_GUESS_ANSWERS,
        friday_paragraph_answers=TEACHER_FRIDAY_PARAGRAPH_ANSWERS,
    )

    print(f"All Week {week_num} files generated successfully!")

# =====================================================================
# RUN
# =====================================================================

if __name__ == "__main__":
    generate()