module Drasil.DocLang.Notebook where

import Language.Drasil

import qualified Data.Drasil.Concepts.Documentation as Doc (introduction, learnObj, caseProb, 
  prpsOfDoc, review, summary, example, appendix, reference)

--  Notebook constructor. 
-- Create the notebook from given system name, authors, and sections
--doc :: NamedIdea c => c -> Sentence -> [Section] -> Document
--doc  sys = Document (Doc.notebook `S.forTPS` sys)

-- * Section Constructors

-- | Section constructors for the lesson plan documents/jupyter notebooks.
-- should be fixed once we have a more concrete idea of the notebook structure
-- TODO: Remove [Section] since the structure of lesson plans should not be nested
-- maybe add a new type Chapter for lesson plans?
intro, learnObj, review, caseProb, summary, appendix, reference, example :: [Contents] -> [Section] -> Section
intro :: [Contents] -> [Section] -> Section
intro     [Contents]
cs [Section]
ss = Sentence -> [Contents] -> [Section] -> Reference -> Section
section (forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.introduction) [Contents]
cs [Section]
ss Reference
introLabel
learnObj :: [Contents] -> [Section] -> Section
learnObj  [Contents]
cs [Section]
ss = Sentence -> [Contents] -> [Section] -> Reference -> Section
section (forall n. NamedIdea n => n -> Sentence
titleize' CI
Doc.learnObj)    [Contents]
cs [Section]
ss Reference
learnObjLabel
review :: [Contents] -> [Section] -> Section
review    [Contents]
cs [Section]
ss = Sentence -> [Contents] -> [Section] -> Reference -> Section
section (forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.review)       [Contents]
cs [Section]
ss Reference
reviewLabel
caseProb :: [Contents] -> [Section] -> Section
caseProb  [Contents]
cs [Section]
ss = Sentence -> [Contents] -> [Section] -> Reference -> Section
section (forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.caseProb)     [Contents]
cs [Section]
ss Reference
caseProbLabel
example :: [Contents] -> [Section] -> Section
example   [Contents]
cs [Section]
ss = Sentence -> [Contents] -> [Section] -> Reference -> Section
section (forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.example)      [Contents]
cs [Section]
ss Reference
exampleLabel
summary :: [Contents] -> [Section] -> Section
summary   [Contents]
cs [Section]
ss = Sentence -> [Contents] -> [Section] -> Reference -> Section
section (forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.summary)      [Contents]
cs [Section]
ss Reference
summaryLabel
appendix :: [Contents] -> [Section] -> Section
appendix  [Contents]
cs [Section]
ss = Sentence -> [Contents] -> [Section] -> Reference -> Section
section (forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.appendix)     [Contents]
cs [Section]
ss Reference
appendixLabel
reference :: [Contents] -> [Section] -> Section
reference [Contents]
cs [Section]
ss = Sentence -> [Contents] -> [Section] -> Reference -> Section
section (forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.reference)   [Contents]
cs [Section]
ss Reference
referenceLabel

--Labels--
sectionReferences :: [Reference]
sectionReferences :: [Reference]
sectionReferences = [Reference
introLabel, Reference
learnObjLabel, Reference
docPurposeLabel, Reference
referenceLabel,
  Reference
reviewLabel, Reference
appendixLabel, Reference
summaryLabel, Reference
exampleLabel]

-- * Section References

-- | Individual section reference labels. Used in creating example sections for the notebook.
introLabel, learnObjLabel, docPurposeLabel, referenceLabel, 
  reviewLabel, caseProbLabel, appendixLabel, summaryLabel, exampleLabel :: Reference
introLabel :: Reference
introLabel          = String -> Sentence -> Reference
makeSecRef String
"Intro"            forall a b. (a -> b) -> a -> b
$ forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.introduction
learnObjLabel :: Reference
learnObjLabel       = String -> Sentence -> Reference
makeSecRef String
"LearnObj"         forall a b. (a -> b) -> a -> b
$ forall n. NamedIdea n => n -> Sentence
titleize' CI
Doc.learnObj
docPurposeLabel :: Reference
docPurposeLabel     = String -> Sentence -> Reference
makeSecRef String
"DocPurpose"       forall a b. (a -> b) -> a -> b
$ forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.prpsOfDoc
referenceLabel :: Reference
referenceLabel      = String -> Sentence -> Reference
makeSecRef String
"References"       forall a b. (a -> b) -> a -> b
$ forall n. NamedIdea n => n -> Sentence
titleize' IdeaDict
Doc.reference
reviewLabel :: Reference
reviewLabel         = String -> Sentence -> Reference
makeSecRef String
"Review"           forall a b. (a -> b) -> a -> b
$ forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.review
caseProbLabel :: Reference
caseProbLabel       = String -> Sentence -> Reference
makeSecRef String
"CaseProb"         forall a b. (a -> b) -> a -> b
$ forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.caseProb
appendixLabel :: Reference
appendixLabel       = String -> Sentence -> Reference
makeSecRef String
"Appendix"         forall a b. (a -> b) -> a -> b
$ forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.appendix
summaryLabel :: Reference
summaryLabel        = String -> Sentence -> Reference
makeSecRef String
"Summary"          forall a b. (a -> b) -> a -> b
$ forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.summary
exampleLabel :: Reference
exampleLabel        = String -> Sentence -> Reference
makeSecRef String
"Example"          forall a b. (a -> b) -> a -> b
$ forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
Doc.example