module Drasil.GlassBR.LabelledContent (
  figures,
  sysCtxFig, physSystFig, demandVsSDFig, dimlessloadVsARFig
) where

import Control.Lens((^.))

import Language.Drasil
import Language.Drasil.Chunk.Concept.NamedCombinators (the)
import qualified Language.Drasil.Development as D (toSent)
import qualified Language.Drasil.Sentence.Combinators as S (versus)

import Data.Drasil.Concepts.Documentation (physicalSystem, sysCont)

import Drasil.GlassBR.Concepts (aR, stdOffDist)
import Drasil.GlassBR.Unitals (aspectRatio, charWeight, demand, demandq,
  dimlessLoad, lateralLoad, sD, stressDistFac)

resourcePath :: String
resourcePath :: String
resourcePath = String
"../../../../datafiles/glassbr/"

figures :: [LabelledContent]
figures :: [LabelledContent]
figures = [LabelledContent
sysCtxFig, LabelledContent
physSystFig,LabelledContent
demandVsSDFig, LabelledContent
dimlessloadVsARFig]

sysCtxFig, physSystFig, demandVsSDFig, dimlessloadVsARFig :: LabelledContent

sysCtxFig :: LabelledContent
sysCtxFig = String -> RawContent -> LabelledContent
llccFig String
"sysCtxDiag" (RawContent -> LabelledContent) -> RawContent -> LabelledContent
forall a b. (a -> b) -> a -> b
$
  Sentence -> String -> RawContent
fig (IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize IdeaDict
sysCont) (String
resourcePath String -> String -> String
forall a. [a] -> [a] -> [a]
++ String
"SystemContextFigure.png")

physSystFig :: LabelledContent
physSystFig = String -> RawContent -> LabelledContent
llccFig String
"physSystImage" (RawContent -> LabelledContent) -> RawContent -> LabelledContent
forall a b. (a -> b) -> a -> b
$ Sentence -> String -> MaxWidthPercent -> RawContent
figWithWidth
  (NPStruct -> Sentence
D.toSent (NPStruct -> Sentence) -> NPStruct -> Sentence
forall a b. (a -> b) -> a -> b
$ NP -> NPStruct
forall n. NounPhrase n => n -> NPStruct
atStartNP (NP -> NPStruct) -> NP -> NPStruct
forall a b. (a -> b) -> a -> b
$ IdeaDict -> NP
forall t. NamedIdea t => t -> NP
the IdeaDict
physicalSystem) (String
resourcePath String -> String -> String
forall a. [a] -> [a] -> [a]
++ String
"physicalsystimage.png") MaxWidthPercent
30

demandVsSDFig :: LabelledContent
demandVsSDFig = String -> RawContent -> LabelledContent
llccFig String
"demandVSsod" (RawContent -> LabelledContent) -> RawContent -> LabelledContent
forall a b. (a -> b) -> a -> b
$ Sentence -> String -> RawContent
fig ((ConceptChunk
demandq ConceptChunk -> Getting Sentence ConceptChunk Sentence -> Sentence
forall s a. s -> Getting a s a -> a
^. Getting Sentence ConceptChunk Sentence
forall c. Definition c => Lens' c Sentence
Lens' ConceptChunk Sentence
defn) Sentence -> Sentence -> Sentence
+:+
  Sentence -> Sentence
sParen (UnitalChunk -> Sentence
forall c. (IsChunk c, HasSymbol c) => c -> Sentence
ch UnitalChunk
demand) Sentence -> Sentence -> Sentence
`S.versus` ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
atStart ConceptChunk
sD Sentence -> Sentence -> Sentence
+:+ Sentence -> Sentence
sParen (CI -> Sentence
forall c. Idea c => c -> Sentence
short CI
stdOffDist)
  Sentence -> Sentence -> Sentence
`S.versus` UncertQ -> Sentence
forall n. NamedIdea n => n -> Sentence
atStart UncertQ
charWeight Sentence -> Sentence -> Sentence
+:+ Sentence -> Sentence
sParen (UncertQ -> Sentence
forall c. (IsChunk c, HasSymbol c) => c -> Sentence
ch UncertQ
charWeight))
  (String
resourcePath String -> String -> String
forall a. [a] -> [a] -> [a]
++ String
"ASTM_F2248-09.png")

dimlessloadVsARFig :: LabelledContent
dimlessloadVsARFig = String -> RawContent -> LabelledContent
llccFig String
"dimlessloadVSaspect" (RawContent -> LabelledContent) -> RawContent -> LabelledContent
forall a b. (a -> b) -> a -> b
$ Sentence -> String -> RawContent
fig (String -> Sentence
S String
"Non dimensional" Sentence -> Sentence -> Sentence
+:+
  IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
lateralLoad Sentence -> Sentence -> Sentence
+:+ Sentence -> Sentence
sParen (DefinedQuantityDict -> Sentence
forall c. (IsChunk c, HasSymbol c) => c -> Sentence
ch DefinedQuantityDict
dimlessLoad)
  Sentence -> Sentence -> Sentence
`S.versus` UncertQ -> Sentence
forall n. NamedIdea n => n -> Sentence
titleize UncertQ
aspectRatio Sentence -> Sentence -> Sentence
+:+ Sentence -> Sentence
sParen (CI -> Sentence
forall c. Idea c => c -> Sentence
short CI
aR)
  Sentence -> Sentence -> Sentence
`S.versus` ConstrConcept -> Sentence
forall n. NamedIdea n => n -> Sentence
atStart ConstrConcept
stressDistFac Sentence -> Sentence -> Sentence
+:+ Sentence -> Sentence
sParen (ConstrConcept -> Sentence
forall c. (IsChunk c, HasSymbol c) => c -> Sentence
ch ConstrConcept
stressDistFac))
  (String
resourcePath String -> String -> String
forall a. [a] -> [a] -> [a]
++ String
"ASTM_F2248-09_BeasonEtAl.png")