{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}

-- | This modules exposes the overall "Introduction to Grammar" course.
module Study.Courses.English.Grammar.Introduction.Course (course) where

import Core
import Study.Courses.English.Grammar.Introduction.Lessons
import Language.Lojban.Dictionaries (englishDictionary)
import Study.Framework.DocumentBuilders (buildDocumentFromMarkdownCode)
import qualified Text.Pandoc as P
import Data.FileEmbed (embedStringFile)

-- introduce djica alongside questions: "I want you to be happy" / "Do you want me to be happy?" / "What do you want?" / "Who wants you to be happy" / "Who do you want to be happy?"
-- TODO: remove the translations that make the least sense (in progress...)

-- Considerations
-- TODO: also accept "ma'a" (and similar terms) whenever "mi" is accepted

-------- Tanru
-- useful gismu: sutra, pelxu
-- lo melbi prenu, lo sutra mlatu, lo sutra gerku, lo gleki prenu, lo melbi prenu, mi mutce gleki
-------- Questions
-- Are you talking about the donation? (lo ka dunda)
-- Who wants to talk to me?
-- Who do you think you are talking to? (?)


-- Reminder: from Lesson 4 onwards, mix propositions and questions

-- | Course description.
longDescription :: P.Pandoc
Right Pandoc
longDescription = Text -> Either PandocError Pandoc
buildDocumentFromMarkdownCode $(embedStringFile "resources/courses/english/grammar/introduction/description.md")

-- | Course credits.
credits :: P.Pandoc
Right Pandoc
credits = Text -> Either PandocError Pandoc
buildDocumentFromMarkdownCode $(embedStringFile "resources/courses/english/grammar/introduction/credits.md")

-- | Course style.
style :: CourseStyle
style :: CourseStyle
style = Maybe String -> Maybe String -> CourseStyle
CourseStyle Maybe String
color1 Maybe String
iconUrl where
    -- Color1
    color1 :: Maybe String
color1 = String -> Maybe String
forall a. a -> Maybe a
Just
        String
"hsl(0, 0%, 30%)"
    -- Icon url
    iconUrl :: Maybe String
iconUrl = String -> Maybe String
forall a. a -> Maybe a
Just
        -- Source: https://www.flaticon.com/free-icon/jigsaw_993723#term=jigsaw&page=1&position=3
        String
"https://image.flaticon.com/icons/svg/993/993723.svg"

        -- Source: https://www.flaticon.com/free-icon/jigsaw_993686
        --"https://image.flaticon.com/icons/svg/993/993686.svg"

        -- Source: https://www.flaticon.com/free-icon/puzzle_755205
        --"https://image.flaticon.com/icons/svg/755/755205.svg"

-- | Course: Introduction to Grammar.
course :: Course
course :: Course
course = Text
-> Text
-> Text
-> Maybe Pandoc
-> Maybe Pandoc
-> CourseStyle
-> Dictionary
-> [Lesson]
-> Course
Course Text
"grammar-intro_eng" Text
title Text
shortDescription (Pandoc -> Maybe Pandoc
forall a. a -> Maybe a
Just Pandoc
longDescription) (Pandoc -> Maybe Pandoc
forall a. a -> Maybe a
Just Pandoc
credits) CourseStyle
style Dictionary
englishDictionary [Lesson]
lessons where
    --title = "Introduction to Grammar (alpha)"
    title :: Text
title = Text
"Getting started with Lojban (alpha)"
    --shortDescription = "Get started with Lojban, and grasp beginner to intermediate concepts of the language."
    shortDescription :: Text
shortDescription = Text
"Get started with Lojban, and assimilate beginner to intermediate concepts of the language."
    lessons :: [Lesson]
lessons = [Lesson
lesson1, Lesson
lesson2, Lesson
lesson3, Lesson
lesson4, Lesson
lesson5, Lesson
lesson6, Lesson
lesson7, Lesson
checkpoint1to7, Lesson
lesson9, Lesson
lesson10, Lesson
lesson11, Lesson
lesson12, Lesson
checkpoint9to12, Lesson
lesson14, Lesson
lesson15, Lesson
lesson16, Lesson
lesson17, Lesson
lesson18, Lesson
checkpoint14to18, Lesson
lesson20, Lesson
lesson21, Lesson
lesson22, Lesson
lesson23, Lesson
lesson24, Lesson
checkpoint20to24, Lesson
lesson26, Lesson
lesson27]