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

import Config.Colour as T exposing (..)
import Config.Format as O exposing (..)
import Config.Identity as I exposing (..)
import Effect exposing (Effect)
import Element exposing (..)
import Element.Font as F
import Html.Attributes as H exposing (style)
import Layouts
import Page exposing (Page)
import Route exposing (Route)
import Services.ServiceList.Coaching.DebateAnalysis exposing (..)
import Services.ServiceList.Coaching.DebateTutoring exposing (..)
import Services.ServiceList.Coaching.NutritionScience exposing (..)
import Services.ServiceList.Creative.NixBuilds exposing (..)
import Services.Helpers exposing (..)
import Shared exposing (..)
import View exposing (View)


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


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



-- INIT


type alias Model =
    {}


init : () -> ( Model, Effect Msg )
init () =
    ( {}
    , Effect.none
    )



-- UPDATE


type Msg
    = NoOp


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



-- SUBSCRIPTIONS


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



-- VIEW


view : Model -> View Msg
view model =
    { title = servicesName
    , attributes = []
    , element = servicesContainer
    }


servicesContainer : Element msg
servicesContainer =
    topLevelContainer servicesList


servicesList : Element msg
servicesList =
    column
        pageList
    <|
        List.map serviceMaker
            [ servicesDebateTutoring
            , servicesDebateAnalysis
            , servicesNutritionScience
            , servicesNixBuilds
            ]
