"""02 — Grammar: to be, Object Pronouns, Prepositions of Time"""
import sys; sys.path.insert(0, '.')
from _helpers import *

doc = new_doc()
heading(doc, "BÖLÜM 1: GRAMMAR", 14)
body(doc, "Bu bölümde Ünite 1'in üç temel grammar konusunu öğreneceksiniz.")

# ── 1.1 to be ──
subhead(doc, '1.1  Present Simple — "to be" (am / is / are)')
body(doc, '"to be" fiili Türkçedeki "olmak" fiilidir. İsim, meslek, yer, yaş ve sıfat belirtirken kullanılır.')
add_table(doc,
    ["Özne", "to be (kısa)", "Örnek"],
    [["I","am → I'm","I am a student."], ["You","are → You're","You are 10 years old."],
     ["He","is → He's","He is my brother."], ["She","is → She's","She is a teacher."],
     ["It","is → It's","It is a cat."], ["We","are → We're","We are friends."],
     ["They","are → They're","They are at school."]]
)

subhead(doc, "Olumsuz Cümle (Negative)")
body(doc, 'Olumsuz yapmak için "not" eklenir:')
add_table(doc,
    ["Olumlu", "Olumsuz (kısa)"],
    [["I am","I am not → I'm not"], ["You are","You are not → You aren't"],
     ["He is","He is not → He isn't"], ["She is","She is not → She isn't"],
     ["It is","It is not → It isn't"], ["We are","We are not → We aren't"],
     ["They are","They are not → They aren't"]]
)

subhead(doc, "Soru Cümlesi (Interrogative)")
body(doc, "Soru yaparken am/is/are öznenin başına gelir. Kısa cevaplar:")
add_table(doc,
    ["Soru", "Evet", "Hayır"],
    [["Am I late?","Yes, I am.","No, I'm not."], ["Are you ready?","Yes, you are.","No, you aren't."],
     ["Is he at home?","Yes, he is.","No, he isn't."], ["Is she happy?","Yes, she is.","No, she isn't."],
     ["Is it a dog?","Yes, it is.","No, it isn't."], ["Are we late?","Yes, we are.","No, we aren't."],
     ["Are they here?","Yes, they are.","No, they aren't."]]
)

doc.add_page_break()
subhead(doc, "1.2  Object Pronouns (Nesne Zamirleri)")
body(doc, "Object pronouns, fiilden ya da edattan sonra gelir. Cümlede nesne görevi görür.")
add_table(doc,
    ["Özne", "Nesne", "Örnek"],
    [["I","me (beni/bana)","He sees me."], ["You","you (seni/sana)","I love you."],
     ["He","him (onu/ona ♂)","Look at him."], ["She","her (onu/ona ♀)","I know her."],
     ["It","it (onu/ona)","Give it to me."], ["We","us (bizi/bize)","They call us."],
     ["They","them (onları/onlara)","I play with them."]]
)

subhead(doc, "Önemli Kurallar")
for t in ["• Fiilden sonra object pronoun gelir:", "     I love her. ✅  |  I love she. ❌",
          "• Edattan (at, to, for, with, before, after) sonra object pronoun gelir:",
          "     Look at him. ✅  |  Look at he. ❌", "     Give it to me. ✅  |  Give it to I. ❌",
          '• "Give something to someone" yapısı:',
          "     give it to me / give them to her / give the book to him"]:
    tip(doc, t)

subhead(doc, "Sık Yapılan Hatalar")
for t in ["  I love she.        ❌  →  I love her.          ✅",
          "  Look at he.        ❌  →  Look at him.          ✅",
          "  Give it to they.   ❌  →  Give it to them.       ✅",
          "  He sees I.         ❌  →  He sees me.            ✅"]:
    tip(doc, t)

# ── 1.3 Prepositions of Time ──
doc.add_page_break()
subhead(doc, "1.3  Prepositions of Time (Zaman Edatları)")
body(doc, "Zaman belirten edatlar bir olayın ne zaman olduğunu anlatır.")
add_table(doc,
    ["Edat", "Kullanım", "Örnek"],
    [["at","saatler","at 7 o'clock, at night"],
     ["in","gün bölümleri","in the morning, in the afternoon"],
     ["on","günler","on Monday, on Sunday"],
     ["before","önce","before school, before breakfast"],
     ["after","sonra","after school, after dinner"]]
)

subhead(doc, "Önemli Kurallar")
for t in ["• Fiilden sonra object pronoun gelir:", "     I love her. ✅  |  I love she. ❌",
          "• Edattan (at, to, for, with, before, after) sonra object pronoun gelir:",
          "     Look at him. ✅  |  Look at he. ❌", "     Give it to me. ✅  |  Give it to I. ❌",
          '• "Give something to someone" yapısı:',
          "     give it to me / give them to her / give the book to him"]:
    tip(doc, t)

subhead(doc, "Sık Yapılan Hatalar")
for t in ["  I love she.        ❌  →  I love her.          ✅",
          "  Look at he.        ❌  →  Look at him.          ✅",
          "  Give it to they.   ❌  →  Give it to them.       ✅",
          "  He sees I.         ❌  →  He sees me.            ✅"]:
    tip(doc, t)

# ── 1.3 Prepositions of Time ──
doc.add_page_break()
subhead(doc, "1.3  Prepositions of Time (Zaman Edatları)")
body(doc, "Zaman belirten edatlar bir olayın ne zaman olduğunu anlatır.")
add_table(doc,
    ["Edat", "Kullanım", "Örnek"],
    [["at","saatlerde","at 7 o'clock"], ["at","bazı kalıplarda","at night, at noon, at midnight"],
     ["in","günün bölümleri","in the morning, in the afternoon, in the evening"],
     ["on","günler","on Monday, on Sunday"],
     ["before","önce","before school, before breakfast"],
     ["after","sonra","after school, after dinner"]]
)

subhead(doc, "before / after Detaylı")
body(doc, "before + isim:")
for t in ["  before school, before breakfast, before dinner", "  before the lesson, before lunch"]:
    tip(doc, t)
doc.add_paragraph()
body(doc, "before + cümle (fiil gelir, özne şart!):")
for t in ["  before I go to bed       — yatmadan önce", "  before he comes home     — o eve gelmeden önce",
          "  before we have dinner    — akşam yemeğinden önce"]:
    tip(doc, t)
doc.add_paragraph()
body(doc, "after + isim:")
for t in ["  after school, after breakfast, after lunch", "  after the party, after the lesson"]:
    tip(doc, t)
doc.add_paragraph()
body(doc, "after + cümle:")
for t in ["  after I wake up          — uyandıktan sonra", "  after she finishes       — o bitirdikten sonra",
          "  after they come          — onlar geldikten sonra"]:
    tip(doc, t)
doc.add_paragraph()
subhead(doc, "⚠️ Dikkat!")
for t in ["  before/after'dan sonra cümle gelirse, o cümlenin kendi öznesi olmalıdır!",
          "  before go to bed       ❌  →  before I go to bed       ✅",
          "  after eat lunch        ❌  →  after we eat lunch       ✅"]:
    tip(doc, t)

doc.save("02_Grammar.docx")
print("✅ 02_Grammar.docx")
