#!/usr/bin/env python3
"""Week 17 Generator - Word Families & Root Words

Phonics: Word Families & Root Words -- suffixes (-er, -est, -ness, -ing) and base words
Spelling: 12 words demonstrating word family patterns
Grammar: Possessives (singular/plural possessive, 's vs. s', its vs. it's)

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

import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
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 = os.path.expanduser("~/Home_School/2nd_Grade/English_Language_Arts/Week_17")

# =====================================================================
# WORD LIST - 12 Word Families & Root Words
# =====================================================================
WORDS = [
    ("helper", "suffix_er", "suffix: -er, base: help"),
    ("player", "suffix_er", "suffix: -er, base: play"),
    ("teaching", "suffix_ing", "suffix: -ing, base: teach"),
    ("quicker", "suffix_er", "suffix: -er, base: quick"),
    ("happiest", "suffix_est", "suffix: -est, base: happy"),
    ("brighter", "suffix_er", "suffix: -er, base: bright"),
    ("brightest", "suffix_est", "suffix: -est, base: bright"),
    ("kindest", "suffix_est", "suffix: -est, base: kind"),
    ("stronger", "suffix_er", "suffix: -er, base: strong"),
    ("darkness", "suffix_ness", "suffix: -ness, base: dark"),
    ("smaller", "suffix_er", "suffix: -er, base: small"),
    ("fastest", "suffix_est", "suffix: -est, base: fast"),
]

PHONICS_LABEL = "Word_Families_and_Root_Words"

# =====================================================================
# SHARED CONTENT
# =====================================================================
LEARNING_TEXT = (
    "A <strong>word family</strong> is a group of words that share the same root or base word.<br>"
    "When we add prefixes or suffixes to a base word, we create new words in the family.<br><br>"
    "Examples:<br>"
    "&bull; <strong>help</strong> &rarr; <strong>helper</strong> (someone who helps)<br>"
    "&bull; <strong>help</strong> &rarr; <strong>helpful</strong> (useful, giving help)<br>"
    "&bull; <strong>help</strong> &rarr; <strong>helpless</strong> (without help)<br><br>"
    "The base word &ldquo;help&rdquo; stays the same, but each suffix changes the meaning."
)

VOWEL_EXAMPLES = [
    "helper &mdash; suffix: -er, base: help",
    "player &mdash; suffix: -er, base: play",
    "teaching &mdash; suffix: -ing, base: teach",
    "quicker &mdash; suffix: -er, base: quick",
    "happiest &mdash; suffix: -est, base: happy",
    "brighter &mdash; suffix: -er, base: bright",
    "brightest &mdash; suffix: -est, base: bright",
    "kindest &mdash; suffix: -est, base: kind",
    "stronger &mdash; suffix: -er, base: strong",
    "darkness &mdash; suffix: -ness, base: dark",
    "smaller &mdash; suffix: -er, base: small",
    "fastest &mdash; suffix: -est, base: fast",
]

GRAMMAR_NOTE = (
    "Grammar: <strong>Possessives</strong> &mdash; "
    "Add &lsquo;s to show ownership (the dog&rsquo;s bone). "
    "For plural nouns ending in s, add only an apostrophe (the dogs&rsquo; bone). "
    "&ldquo;its&rdquo; shows possession; &ldquo;it&rsquo;s&rdquo; means &ldquo;it is.&rdquo;"
)

GRAMMAR_DEEP = (
    "When a noun shows ownership, we make it <strong>possessive</strong>.<br><br>"
    "&ldquo;Sarah&rsquo;s book&rdquo; means the book belongs to Sarah.<br>"
    "&ldquo;The students&rsquo; classroom&rdquo; means the classroom belongs to many students.<br><br>"
    "Remember: if it belongs to ONE thing, add &lsquo;s. "
    "If it belongs to MORE THAN ONE, add just the apostrophe."
)

REMINDER_TEXT = (
    "Word Family Tips:<br><br>"
    "1. The base word is the &ldquo;root&rdquo; that everything builds from.<br>"
    "2. <strong>help</strong> &rarr; helper, helpful, helpless, helping<br>"
    "3. <strong>bright</strong> &rarr; brighter, brightest<br>"
    "4. <strong>happy</strong> &rarr; happiest (drop the y, add -iest)<br>"
    "5. <strong>dark</strong> &rarr; darkness (add -ness to make a noun)<br><br>"
    "Remember: suffixes change the meaning but the base word stays recognizable!"
)

SORT_LABELS = [
    "Comparative (-er)",
    "Superlative (-est)",
    "Other Suffix",
]

# =====================================================================
# MONDAY DATA
# =====================================================================
MONDAY_STORY = (
    "The <strong>helper</strong> at the school was the <strong>quicker</strong> worker this week. "
    "She helped the <strong>player</strong> on the team practice every day. "
    "Her <strong>teaching</strong> made everyone feel the <strong>happiest</strong> and <strong>stronger</strong>. "
    "The <strong>kindest</strong> teacher made the room <strong>brighter</strong> with new posters. "
    "She said even the <strong>smaller</strong> students could be the <strong>brightest</strong> learners. "
    "Outside, the <strong>darkness</strong> came early in winter, but the <strong>smallest</strong> "
    "students were still the <strong>fastest</strong> runners on the field."
)

MONDAY_GRAMMAR_PRACTICE = [
    ("the <span class='blank blank-10'></span> tail is wagging.", "dog &rarr; dog&rsquo;s"),
    ("the <span class='blank blank-10'></span> are barking loudly.", "dogs &rarr; dogs&rsquo;"),
    ("<span class='blank blank-10'></span> book is on the table.", "Sarah &rarr; Sarah&rsquo;s"),
    ("the <span class='blank blank-10'></span> classroom is upstairs.", "students &rarr; students&rsquo;"),
]

MONDAY_FILL_DATA = [
    ("The <span class='blank blank-10'></span> showed me around the school.", "helper"),
    ("The <span class='blank blank-10'></span> scored a winning goal.", "player"),
    ("The <strong><span class='blank blank-10'></span></strong> we start, the sooner we finish.", "quicker"),
    ("She was the <span class='blank blank-10'></span> person in the room.", "happiest"),
]

MONDAY_OPPOSITE_WORDS = ["quicker", "happiest", "brighter"]

MONDAY_SENTENCE_WORDS = ["helper", "player", "teaching", "quicker"]

# =====================================================================
# TUESDAY DATA
# =====================================================================
TUESDAY_LEARNING = (
    "Today we practice finding word family words in reading. "
    "Identify the base word and suffix for each word you see, "
    "and practice possessive forms."
)

TUESDAY_READING = (
    "The <strong>helper</strong> at the store was the <strong>quickest</strong> worker. "
    "She could find anything <strong>faster</strong> than anyone else. "
    "The <strong>player</strong> next door practiced every day until she was the "
    "<strong>brightest</strong> and <strong>strongest</strong> on the team. "
    "Her <strong>teaching</strong> helped everyone become better. "
    "The <strong>darkness</strong> of the evening was the only thing that could make "
    "her feel <strong>smaller</strong> than she really was."
)

TUESDAY_COMP_QUESTIONS = [
    "What suffix does &ldquo;helper&rdquo; use? What is the base word?",
    "Find two words with the suffix &ldquo;-er&rdquo; in the passage.",
    "What does &ldquo;darkness&rdquo; mean in the passage?",
]

TUESDAY_SCRAMBLE_WORDS = [
    "helper", "player", "teaching", "quicker", "happiest", "brighter",
]

TUESDAY_PATTERN_HUNT_WORDS = [
    "helper", "player", "teaching", "quicker", "happiest", "brighter",
    "brightest", "kindest", "stronger", "darkness", "smaller", "fastest",
    "running", "jumping", "big", "fast", "small",
]

TUESDAY_SWAP_DATA = [
    ("The helper taught the player.",
     ("helper", "player"), ("teaching", "brighter")),
    ("The darkness fell stronger at night.",
     ("darkness", "teaching"), ("stronger", "happiest")),
    ("She is the happiest in class.",
     ("happiest", "fastest"), ("brightest", "player")),
]

TUESDAY_BUILDER_PROMPTS = [
    ("Write a sentence using &lsquo;helper&rsquo;.", "helper"),
    ("Write a sentence using &lsquo;brighter&rsquo; to compare two things.", "brighter"),
    ("Write a sentence using a possessive form.", "Sarah&rsquo;s"),
]

TUESDAY_REMEMBER_BOXES = [
    (
        "Remember This!",
        '<table style="width:100%;border-collapse:separate;border-spacing:4px;font-size:11px;"><tr>'
        '<td style="vertical-align:top;width:50%;">'
        'Word Families:<br>'
        '- <strong>help</strong> &rarr; helper, helpful, helpless<br>'
        '- <strong>bright</strong> &rarr; brighter, brightest<br>'
        '- <strong>quick</strong> &rarr; quicker, quickest<br>'
        '</td>'
        '<td style="vertical-align:top;width:50%;">'
        'Suffix Sounds:<br>'
        '- <strong>-er</strong> &rarr; /&uml;r/ (comparative)<br>'
        '- <strong>-est</strong> &rarr; /&#253;st/ (superlative)<br>'
        '- <strong>-ness</strong> &rarr; /n&#710;s/ (noun)<br><br>'
        '<strong>Try This:</strong> What is the base of "darkness"? ___'
        '</td></tr></table>'
    ),
    (
        "Possessive Rules!",
        '<table style="width:100%;border-collapse:separate;border-spacing:4px;font-size:11px;"><tr>'
        '<td style="vertical-align:top;width:50%;">'
        'Singular possessive:<br><br>'
        'the <strong>dog&rsquo;s</strong> bone<br>'
        '<strong>Sarah&rsquo;s</strong> book<br><br>'
        'Plural possessive:<br><br>'
        'the <strong>dogs&rsquo;</strong> toys<br>'
        '</td>'
        '<td style="vertical-align:top;width:50%;">'
        'Its vs. It&rsquo;s:<br><br>'
        '<strong>its</strong> = possession (the dog&rsquo;s tail &rarr; its tail)<br>'
        '<strong>it&rsquo;s</strong> = it is (it&rsquo;s raining)<br><br>'
        '<strong>Try This:</strong> Fix: "its a sunny day." ___'
        '</td></tr></table>'
    ),
]

# =====================================================================
# WEDNESDAY DATA
# =====================================================================
WEDNESDAY_LEARNING = (
    "Today we deepen our understanding of word families. "
    "Practice identifying base words, building word families, "
    "and applying possessive rules."
)

WEDNESDAY_LEARNING_SKILLS = [
    "<strong>Word Families</strong> &mdash; identify base words and suffixes",
    "<strong>Possessives</strong> &mdash; singular vs. plural possessive forms",
    "<strong>Its vs. It&rsquo;s</strong> &mdash; possessive vs. contraction",
]

WEDNESDAY_READING_PASSAGE = (
    "The <strong>helper</strong> at the school was the <strong>quicker</strong> teacher. "
    "She made learning <strong>brighter</strong> for every student. "
    "The <strong>player</strong> on the team worked the <strong>hardest</strong> and became the "
    "<strong>strongest</strong>. Her <strong>teaching</strong> style made the <strong>smallest</strong> "
    "child feel the <strong>happiest</strong>. Even in the <strong>darkness</strong> of winter, "
    "she was the <strong>fastest</strong> to bring a smile to everyone."
)

WEDNESDAY_VOCAB_Q = (
    "In the sentence &ldquo;The darkness of winter made it cold,&rdquo; "
    "what is the base word of &ldquo;darkness&rdquo;?<br><br>"
    "A) darkly<br>B) dark<br>C) darken<br>D) darker"
)

WEDNESDAY_SYN_ANT = [
    "helper", "quicker", "brighter", "happiest", "stronger", "fastest"
]

WEDNESDAY_WORD_WEB_CENTER = "help"
WEDNESDAY_WORD_WEB_INSTRUCTION = "Write 4 words that belong to the &ldquo;help&rdquo; word family."

WEDNESDAY_SORT_DATA = [
    "The helper showed everyone the way",
    "The darkness made it hard to see",
    "She is the happiest person in the room",
]

WEDNESDAY_CORRECT = [
    "the helper at the store was quicker.",
    "its time to go home.",
    "the students classroom is upstairs.",
]

WEDNESDAY_FILL = [
    ("She is the <span class='blank blank-10'></span> student in class.", "happiest"),
    ("This box is <span class='blank blank-10'></span> than that one.", "smaller"),
    ("He is a very <span class='blank blank-10'></span> person.", "helper"),
    ("The <span class='blank blank-10'></span> scared me at night.", "darkness"),
]

WEDNESDAY_CONTEXT = (
    'Read this sentence: "The brightest star appeared at night."<br><br>'
    "What is the base word of <strong>brightest</strong>?<br>"
    "A) brightly<br>B) bright<br>C) brighter<br>D) brighten"
)

# =====================================================================
# THURSDAY DATA
# =====================================================================
THURSDAY_LEARNING = (
    "Today we use our word family words in original writing. "
    "Practice choosing the right suffix for the right meaning "
    "and applying possessive rules."
)

THURSDAY_STORY = (
    "Once upon a time, a young <strong>helper</strong> named Lily wanted to be the "
    "<strong>fastest</strong> runner in her class. She practiced every day after "
    "<strong>teaching</strong> her little brother how to read. "
    "Soon she was <strong>quicker</strong> and <strong>brighter</strong> than everyone else. "
    "The coach was the <strong>kindest</strong> person she knew. "
    "Lily&rsquo;s hard work made her the <strong>brightest</strong> star on the team. "
    "Even when <strong>darkness</strong> fell, she kept practicing. "
    "She became <strong>stronger</strong> each day and the <strong>happiest</strong> "
    "<strong>player</strong> of all, bigger than the <strong>smaller</strong> ones."
)

THURSDAY_COMP_QUESTIONS = [
    "What suffix does &ldquo;helper&rdquo; use? What does it mean?",
    "How does &ldquo;brightest&rdquo; describe Lily?",
    "Who was the kindest person in the story?",
]

THURSDAY_SORT_DATA = [
    "The helper showed everyone the way",
    "The teaching made learning fun",
]

THURSDAY_DETECTIVE = [
    "hlperr", "playr", "teachng", "quker", "happist", "brghter",
    "brghtst", "kindst", "strnger", "darkns", "smaler", "fastst",
]

THURSDAY_SWAP_DATA = [
    ("The helper taught the player.",
     ("helper", "player"), ("teaching", "brighter")),
    ("She is the happiest in class.",
     ("happiest", "kindest"), ("brightest", "teaching")),
]

THURSDAY_MAP_WORD = "help"
THURSDAY_PARA_PROMPTS = [
    "Write a paragraph about being a helper. Use at least 3 word family words.",
    "Write a paragraph comparing two things using -er and -est suffixes.",
]

THURSDAY_STORY_PROMPT = (
    "Write a story using at least 5 word family words. Use correct possessives!"
)

# =====================================================================
# FRIDAY DATA
# =====================================================================
FRIDAY_REVIEW_STORY = (
    "On Friday, our class learned about word families. "
    "The <strong>helper</strong> at school was the <strong>quicker</strong> worker. "
    "She made the classroom <strong>brighter</strong> every day with her "
    "<strong>teaching</strong>. The <strong>player</strong> on the team was the "
    "<strong>fastest</strong> runner and the <strong>brightest</strong>, "
    "<strong>kindest</strong> teammate. She was the <strong>happiest</strong> when she won, "
    "and grew <strong>stronger</strong> even when the <strong>darkness</strong> of winter "
    "made everything feel <strong>smaller</strong>."
)

FRIDAY_STORY_QUESTIONS = [
    "What suffix does &ldquo;helper&rdquo; use? What is the base word?",
    "What does &ldquo;darkness&rdquo; mean in the story?",
    "Name two words from the story that use the suffix &ldquo;-er.&rdquo;",
]

FRIDAY_OPPOSITE_WORDS = ["quicker", "happiest", "brighter"]

FRIDAY_BUILDER_WORDS = ["teaching", "stronger", "darkness", "fastest"]

FRIDAY_JOURNAL_WORDS = ["helper", "player", "brighter", "kindest"]

# =====================================================================
# TEACHER GUIDE DATA
# =====================================================================
TEACHER_MONDAY_PHONICS_EXPLANATION = (
    "WORD FAMILIES &amp; ROOT WORDS &mdash; A word family is a group of words that share "
    "the same base or root word. Adding suffixes changes the meaning or grammatical function.<br><br>"
    "&bull; <strong>helper</strong> &mdash; suffix: -er, base: help (one who helps)<br>"
    "&bull; <strong>player</strong> &mdash; suffix: -er, base: play (one who plays)<br>"
    "&bull; <strong>teaching</strong> &mdash; suffix: -ing, base: teach (the act of teaching)<br>"
    "&bull; <strong>quicker</strong> &mdash; suffix: -er, base: quick (comparative)<br>"
    "&bull; <strong>happiest</strong> &mdash; suffix: -est, base: happy (superlative; drop y, add -iest)<br>"
    "&bull; <strong>brighter</strong> &mdash; suffix: -er, base: bright (comparative)<br>"
    "&bull; <strong>brightest</strong> &mdash; suffix: -est, base: bright (superlative)<br>"
    "&bull; <strong>kindest</strong> &mdash; suffix: -est, base: kind (superlative)<br>"
    "&bull; <strong>stronger</strong> &mdash; suffix: -er, base: strong (comparative)<br>"
    "&bull; <strong>darkness</strong> &mdash; suffix: -ness, base: dark (state of being dark)<br>"
    "&bull; <strong>smaller</strong> &mdash; suffix: -er, base: small (comparative)<br>"
    "&bull; <strong>fastest</strong> &mdash; suffix: -est, base: fast (superlative)<br><br>"
    "Important: Teach students to identify the BASE WORD first, then recognize the suffix."
)

TEACHER_MONDAY_GRAMMAR_FOCUS = (
    "Possessives &mdash; Singular/Plural Possessive, &lsquo;s vs. s&rsquo;, Its vs. It&rsquo;s"
)

TEACHER_MONDAY_GRAMMAR_EXPLANATION = (
    "Possessives show ownership.<br><br>"
    "&bull; <strong>Singular possessive</strong>: Add &lsquo;s "
    "(the dog&rsquo;s bone, Sarah&rsquo;s book).<br>"
    "&bull; <strong>Plural possessive</strong>: Add only &rsquo; after the s "
    "(the dogs&rsquo; toys, students&rsquo; classroom).<br>"
    "&bull; <strong>Its vs. It&rsquo;s</strong>: &ldquo;its&rdquo; shows possession "
    "(the dog chased its tail). &ldquo;It&rsquo;s&rdquo; is a contraction of "
    "&ldquo;it is&rdquo; (it&rsquo;s raining).<br>"
    "&bull; <strong>Names ending in s</strong>: Can add &lsquo;s or just &rsquo; "
    "(James&rsquo;s book or James&rsquo; book).<br><br>"
    "Common mistake: Using &ldquo;it&rsquo;s&rdquo; when they mean the possessive "
    "&ldquo;its.&rdquo;"
)

TEACHER_MONDAY_SORT_LABELS = [
    "Comparative (-er)",
    "Superlative (-est)",
    "Other Suffix",
]

TEACHER_MONDAY_SORT_ANSWERS = [
    ["quicker", "brighter", "stronger", "smaller"],
    ["happiest", "brightest", "kindest", "fastest"],
    ["helper", "player", "teaching", "darkness"],
]

TEACHER_MONDAY_FILL_ANSWERS = ["helper", "player", "quicker", "happiest"]

TEACHER_MONDAY_OPPOSITE_ANSWERS = [
    ("quicker", "slower"),
    ("happiest", "saddest"),
    ("brighter", "darker"),
]

TEACHER_MONDAY_SENTENCE_WORDS = ["helper", "player", "teaching", "quicker"]

# Tuesday Teacher Guide
TEACHER_TUESDAY_PHONICS_EXPLANATION = (
    "Students continue building word family fluency. Today&rsquo;s focus shifts from "
    "identification to APPLICATION &mdash; finding the correct base word and suffix in "
    "reading passages, identifying possessive forms, and using words in original sentences."
)

TEACHER_TUESDAY_SCRAMBLE_ANSWERS = [
    ("rehpel", "helper"),
    ("yalper", "player"),
    ("gnihcaet", "teaching"),
    ("rekciqq", "quicker"),
    ("tsiephah", "happiest"),
    ("rethgirb", "brighter"),
]

TEACHER_TUESDAY_COMP_QUESTIONS = [
    "What suffix does &ldquo;helper&rdquo; use? What is the base word?",
    "Find two words with the suffix &ldquo;-er&rdquo; in the passage.",
    "What does &ldquo;darkness&rdquo; mean in the passage?",
]

TEACHER_TUESDAY_COMP_ANSWERS = [
    "Helper: suffix &ldquo;-er&rdquo;, base word &ldquo;help&rdquo;",
    "Words with &ldquo;-er&rdquo;: helper, quicker (also: stronger)",
    "Darkness = the state of being dark, lack of light",
]

TEACHER_TUESDAY_PATTERN_HUNT = {
    "match": [
        "helper", "player", "teaching", "quicker", "happiest", "brighter",
        "brightest", "kindest", "stronger", "darkness", "smaller", "fastest",
    ],
    "decoy": ["running", "jumping", "big", "fast", "small"],
}

TEACHER_TUESDAY_SWAP_ANSWERS = [
    "player, brighter",
    "teaching, stronger",
    "fastest, player",
]

TEACHER_TUESDAY_BUILDER_PROMPTS = [
    ("Write a sentence using &lsquo;helper&rsquo;.", "helper"),
    ("Write a sentence using &lsquo;brighter&rsquo; to compare two things.", "brighter"),
    ("Write a sentence using a possessive form.", "Sarah&rsquo;s"),
]

# Wednesday Teacher Guide
TEACHER_WEDNESDAY_PHONICS_EXPLANATION = (
    "Mid-week deepening. Students now move beyond recognition into ANALYSIS &mdash; "
    "understanding word meanings from context, connecting word families (word web), "
    "and applying possessive rules including its vs. it&rsquo;s."
)

TEACHER_WEDNESDAY_VOCAB_Q_QUESTION = (
    "In &ldquo;The darkness of winter made it cold,&rdquo; what is the base word of darkness?"
)
TEACHER_WEDNESDAY_VOCAB_Q_ANSWER = "B) dark"

TEACHER_WEDNESDAY_SYN_ANT_WORDS = [
    "helper", "quicker", "brighter", "happiest", "stronger", "fastest"
]

TEACHER_WEDNESDAY_WORD_WEB_CENTER = "help"
TEACHER_WEDNESDAY_WORD_WEB_SUGGESTIONS = [
    "helper", "helpful", "helpless", "helping"
]

TEACHER_WEDNESDAY_SORT_ANSWERS = {
    "sentences": [
        "The helper showed everyone the way",
        "The darkness made it hard to see",
        "She is the happiest person in the room",
    ],
    "correct_order": [
        "The helper showed everyone the way.",
        "The darkness made it hard to see.",
        "She is the happiest person in the room.",
    ],
}

TEACHER_WEDNESDAY_CORRECT_ANSWERS = [
    ("the helper at the store was quicker.", "The helper at the store was quicker."),
    ("its time to go home.", "It&rsquo;s time to go home."),
    ("the students classroom is upstairs.", "The students&rsquo; classroom is upstairs."),
]

TEACHER_WEDNESDAY_FILL_ANSWERS = [
    "happiest", "smaller", "helper", "darkness"
]

TEACHER_WEDNESDAY_CONTEXT_CLUE_QUESTION = (
    "In &ldquo;The brightest star appeared at night,&rdquo; what is the base word of brightest?"
)
TEACHER_WEDNESDAY_CONTEXT_CLUE_ANSWER = "B) bright"

TEACHER_WEDNESDAY_DICTATION_WORDS = [w[0] for w in WORDS]

# Thursday Teacher Guide
TEACHER_THURSDAY_PHONICS_EXPLANATION = (
    "Application day. Students use word family words in creative writing, showing they "
    "can choose the right suffix for the right context. Spelling Detective activity "
    "reinforces spelling of each word."
)

TEACHER_THURSDAY_COMP_QUESTIONS = [
    "What suffix does &ldquo;helper&rdquo; use? What does it mean?",
    "How does &ldquo;brightest&rdquo; describe Lily?",
    "Who was the kindest person in the story?",
]

TEACHER_THURSDAY_COMP_ANSWERS = [
    "Helper uses -er suffix, meaning &ldquo;one who helps.&rdquo;",
    "Brightest describes Lily as the most outstanding/star player on the team.",
    "The coach was the kindest person.",
]

TEACHER_THURSDAY_SORT_ANSWERS = {
    "sentences": [
        "The helper showed everyone the way",
        "The teaching made learning fun",
    ],
    "correct_order": [
        "The helper showed everyone the way.",
        "The teaching made learning fun.",
    ],
}

TEACHER_THURSDAY_DETECTIVE_ANSWERS = [
    ("hlperr", "helper"), ("playr", "player"), ("teachng", "teaching"),
    ("quker", "quicker"), ("happist", "happiest"), ("brghter", "brighter"),
    ("brghtst", "brightest"), ("kindst", "kindest"), ("strnger", "stronger"),
    ("darkns", "darkness"), ("smaler", "smaller"), ("fastst", "fastest"),
]

TEACHER_THURSDAY_SWAP_ANSWERS = [
    "player, brighter",
    "kindest, teacher",
]

TEACHER_THURSDAY_MAP_WORD = "help"

TEACHER_THURSDAY_MAP_SUGGESTIONS = [
    "helper (one who helps)",
    "helpful (useful, giving help)",
    "helpless (without help)",
    "helping (in the act of helping)",
]

TEACHER_THURSDAY_PARA_PROMPTS = [
    "Write a paragraph about being a helper. Use at least 3 word family words.",
    "Write a paragraph comparing two things using -er and -est suffixes.",
]

# Friday Teacher Guide
TEACHER_FRIDAY_PHONICS_EXPLANATION = (
    "Review and assessment day. Students demonstrate their understanding of word families "
    "through spelling tests, reading comprehension, and creative writing."
)

TEACHER_FRIDAY_TEST_ANSWERS = [w[0] for w in WORDS]

TEACHER_FRIDAY_STORY_QUESTIONS = [
    "What suffix does &ldquo;helper&rdquo; use? What is the base word?",
    "What does &ldquo;darkness&rdquo; mean in the story?",
    "Name two words from the story that use the suffix &ldquo;-er.&rdquo;",
]

TEACHER_FRIDAY_STORY_ANSWERS = [
    "Helper: suffix &ldquo;-er&rdquo;, base word &ldquo;help&rdquo;",
    "Darkness = the state of being dark, lack of light",
    "Any two of: helper, quicker, brighter, teaching, player, smaller",
]

TEACHER_FRIDAY_OPPOSITE_ANSWERS = [
    ("quicker", "slower"),
    ("happiest", "saddest"),
    ("brighter", "darker"),
]

TEACHER_FRIDAY_BUILDER_WORDS = ["teaching", "stronger", "darkness", "fastest"]
TEACHER_FRIDAY_JOURNAL_WORDS = ["helper", "player", "brighter", "kindest"]

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

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

    # Monday
    generate_monday(
        week_dir=week_dir,
        week_num=week_num,
        phonics_label=PHONICS_LABEL,
        words=WORDS,
        learning_text=LEARNING_TEXT,
        vowel_examples=VOWEL_EXAMPLES,
        grammar_note=GRAMMAR_NOTE,
        grammar_deep=GRAMMAR_DEEP,
        grammar_practice=MONDAY_GRAMMAR_PRACTICE,
        story_text=MONDAY_STORY,
        sort_labels=SORT_LABELS,
        sort_title="Word Family Sort: Suffix Type",
        fill_data=MONDAY_FILL_DATA,
        opposite_words=MONDAY_OPPOSITE_WORDS,
        sentence_words=MONDAY_SENTENCE_WORDS,
    )

    # Tuesday
    generate_tuesday(
        week_dir=week_dir,
        week_num=week_num,
        phonics_label=PHONICS_LABEL,
        words=WORDS,
        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,
    )

    # Wednesday
    generate_wednesday(
        week_dir=week_dir,
        week_num=week_num,
        phonics_label=PHONICS_LABEL,
        words=WORDS,
        learning_text=WEDNESDAY_LEARNING,
        learning_skills=WEDNESDAY_LEARNING_SKILLS,
        reading_passage=WEDNESDAY_READING_PASSAGE,
        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=WEDNESDAY_CONTEXT,
    )

    # Thursday
    generate_thursday(
        week_dir=week_dir,
        week_num=week_num,
        phonics_label=PHONICS_LABEL,
        words=WORDS,
        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,
    )

    # Friday
    generate_friday(
        week_dir=week_dir,
        week_num=week_num,
        phonics_label=PHONICS_LABEL,
        words=WORDS,
        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,
    )

    # Teacher Guide
    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=TEACHER_MONDAY_SORT_LABELS,
        monday_sort_answers=TEACHER_MONDAY_SORT_ANSWERS,
        monday_fill_answers=TEACHER_MONDAY_FILL_ANSWERS,
        monday_opposite_answers=TEACHER_MONDAY_OPPOSITE_ANSWERS,
        monday_sentence_words=TEACHER_MONDAY_SENTENCE_WORDS,
        # Tuesday
        tuesday_phonics_explanation=TEACHER_TUESDAY_PHONICS_EXPLANATION,
        tuesday_scramble_answers=TEACHER_TUESDAY_SCRAMBLE_ANSWERS,
        tuesday_comp_questions=TEACHER_TUESDAY_COMP_QUESTIONS,
        tuesday_comp_answers=TEACHER_TUESDAY_COMP_ANSWERS,
        tuesday_pattern_hunt_answers=TEACHER_TUESDAY_PATTERN_HUNT,
        tuesday_swap_answers=TEACHER_TUESDAY_SWAP_ANSWERS,
        tuesday_builder_prompts=TEACHER_TUESDAY_BUILDER_PROMPTS,
        # 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=TEACHER_WEDNESDAY_SYN_ANT_WORDS,
        wednesday_word_web_center=TEACHER_WEDNESDAY_WORD_WEB_CENTER,
        wednesday_word_web_suggestions=TEACHER_WEDNESDAY_WORD_WEB_SUGGESTIONS,
        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_CONTEXT_CLUE_QUESTION,
        wednesday_context_clue_answer=TEACHER_WEDNESDAY_CONTEXT_CLUE_ANSWER,
        wednesday_dictation_words=TEACHER_WEDNESDAY_DICTATION_WORDS,
        # Thursday
        thursday_phonics_explanation=TEACHER_THURSDAY_PHONICS_EXPLANATION,
        thursday_comp_questions=TEACHER_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=TEACHER_THURSDAY_MAP_WORD,
        thursday_map_suggestions=TEACHER_THURSDAY_MAP_SUGGESTIONS,
        thursday_para_prompts=TEACHER_THURSDAY_PARA_PROMPTS,
        # Friday
        friday_phonics_explanation=TEACHER_FRIDAY_PHONICS_EXPLANATION,
        friday_test_answers=TEACHER_FRIDAY_TEST_ANSWERS,
        friday_story_questions=TEACHER_FRIDAY_STORY_QUESTIONS,
        friday_story_answers=TEACHER_FRIDAY_STORY_ANSWERS,
        friday_opposite_answers=TEACHER_FRIDAY_OPPOSITE_ANSWERS,
        friday_builder_words=TEACHER_FRIDAY_BUILDER_WORDS,
        friday_journal_words=TEACHER_FRIDAY_JOURNAL_WORDS,
    )


if __name__ == "__main__":
    import argparse
    ap = argparse.ArgumentParser()
    ap.add_argument("--week-dir", default=WEEK)
    ap.add_argument("--week-num", type=int, default=17)
    args = ap.parse_args()

    print(f"Generating Week {args.week_num}: Word Families & Root Words")
    print(f"  Using shared module system (monday.py, tuesday.py, etc.)")
    generate(week_dir=args.week_dir, week_num=args.week_num)
    print("Done.")