module Start.View exposing (view)
import Start.Model exposing (Model, Msg, Tab)
import Start.Custom exposing (tabs)
import Html exposing (Html, text, div, span, h1, a)
import Html.Attributes exposing (class, style, href)
import Html.Events exposing (onClick)
import FeatherIcons

view : Model -> List (Html Msg)
view () =
    [ div [ class "tab-container" ] <|
        h1 [] [ text "Welcome." ] :: List.map viewTab tabs
    ]

viewTab : Tab -> Html Msg
viewTab t =
    a [ class "tab", style "border-color" t.color, href t.link ]
        [ FeatherIcons.toHtml [] t.icon
        , span [ class "tab-title" ] [ text t.name ]
        ]
