module Pages.Services.Coaching exposing (Model, Msg, page)

import Config.Helpers.Articles.Article exposing (contentList)
import Config.Helpers.Articles.Markdown as Markdown
import Config.Helpers.Cards.Inner.BuyButton exposing (buyButton)
import Config.Helpers.Cards.Outer.Helpers exposing (cardMaker)
import Config.Helpers.Cards.Outer.Types as C exposing (Cardable(..))
import Config.Helpers.Headers.Types exposing (Header)
import Config.Helpers.Response
    exposing
        ( pageList
        , topLevelContainer
        )
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Blogs.Types exposing (BlogArticle)
import Config.Pages.Services.Records.DebateCoaching exposing (servicesDebateCoaching)
import Config.Style.Colour.Helpers exposing (colourTheme)
import Effect exposing (Effect)
import Element as E
    exposing
        ( Device
        , DeviceClass(..)
        , Element
        , Orientation(..)
        , centerX
        , column
        , el
        , paddingXY
        )
import Layouts
import Page exposing (Page)
import Ports
import Route exposing (Route)
import Route.Path as Path
import Shared
import View exposing (View)


page : Shared.Model -> Route () -> Page Model Msg
page shared route =
    Page.new
        { init = init
        , update = update
        , subscriptions = subscriptions
        , view = view shared
        }
        |> Page.withLayout toLayout


toLayout : Model -> Layouts.Layout Msg
toLayout model =
    Layouts.Navbar {}



-- INIT


type alias Model =
    {}


init : () -> ( Model, Effect Msg )
init () =
    ( {}
    , Effect.map
        (\_ -> NoOp)
        (Effect.sendCmd resetViewport)
    )



-- UPDATE


type Msg
    = NoOp
    | MarkdownMsg Markdown.Msg


update : Msg -> Model -> ( Model, Effect Msg )
update msg model =
    case msg of
        NoOp ->
            ( model
            , Effect.none
            )

        MarkdownMsg (Markdown.ScrollToElement elementId) ->
            ( model
            , Effect.sendCmd (Ports.scrollToElement elementId)
            )



-- SUBSCRIPTIONS


subscriptions : Model -> Sub Msg
subscriptions model =
    Sub.none



-- VIEW


view : Shared.Model -> Model -> View Msg
view shared model =
    { title = "services (coaching)"
    , attributes = []
    , element = coachingContainer shared.device
    }


coachingContainer : Device -> Element Msg
coachingContainer device =
    topLevelContainer (coachingList device)


coachingList : Device -> Element Msg
coachingList device =
    column
        (case ( device.class, device.orientation ) of
            _ ->
                pageList device
        )
    <|
        List.concat
            [ List.map
                (\service ->
                    cardMaker device
                        (C.BlogArticle service)
                        (contentList service
                            [ el
                                [ paddingXY 0 10
                                , centerX
                                ]
                              <|
                                buyButton "Book!" "https://buy.stripe.com/14k01f3Vd6gY6J2146"
                            ]
                            MarkdownMsg
                        )
                )
                [ debateCoaching ]
            ]


debateCoaching : BlogArticle
debateCoaching =
    { articleName = String.toUpper "Debate Tutoring"
    , articleLink = ""
    , articleAuthor = ""
    , isNewTabLink = False
    , hasReferences = False
    , hasTableOfContents = False
    , articleImage = ""
    , articlePublished = ""
    , articleBody = """
This service is designed to help you gain an understanding of the fundamentals of debate, and the tools used in debate. The service spans five modules, covering fallacious reasoning, epistemology, and propositional logic. You're free to choose which modules you want to cover, based on your current knowledge and interests.
If interested clients choose to text their knowledge and sharpen their skills with mock debates, they may be subject to additional fees, as mock debates often involve the inclusion of skillful third parties against whom clients can spar.

# WHAT YOU GET

1. A five-module course covering critical thinking, debate strategy, and propositional logic, designed to strengthen your debating skills.

2. Personalized feedback and guidance to boost your strategic thinking, verbal comfort, and overall debate effectiveness.

3. Optional mock debates and staged confrontations, helping you gain experience and confidence in real-world debates.

# SYLLABUS

>## MODULE 1
>
>• Study both common and obscure logical fallacies.
>
>• Learn to identify and rebut fallacious reasoning.
>
>• Test your knowledge of logical fallacies.

>## MODULE 2
>
>• Assignment review.
>
>• Study concepts related to formal logic and argumentation.
>
>• Learn the lexicon of debate and formal reasoning.
>
>• Test your knowledge of debate-related terminology.

>## MODULE 3
>
>• Assignment review.
>
>• Study philosophical concepts relevant to debate.
>
>• Learn about epistemology and the philosophy of science.
>
>• Test your knowledge of debate-related philosophical concepts.

>## MODULE 4
>
>• Assignment review.
>
>• Study the different modes of argumentation.
>
>• Learn the principles and axioms of propositional logic.
>
>• Test your knowledge of propositional logic fundamentals.

>## MODULE 5
>
>• Assignment review.
>
>• Study the inference rules of propositional logic.
>
>• Learn how to form valid formal arguments.
>
>• Test your knowledge of formal logic.

>## OPTIONAL
>
>• Test your knowledge in an optional mock debate.
>
>• Choose between general, empirical, and NTT-style debate.
>
>• Have your performance analyzed in realtime.

"""
    , articleReferences =
        [ { author = ""
          , title = ""
          , journal = ""
          , year = ""
          , link = ""
          }
        ]
    }
