module Main exposing
  ( main
  )

import Navigation
import Time
import Msg

import Model exposing (init)
import Update exposing (update, urlUpdate)
import View exposing (view)
import Page
import Tooltip

main =
  Navigation.programWithFlags (Navigation.makeParser Page.fromHash)
    { init = init
    , view = view
    , update = update
    , urlUpdate = urlUpdate
    , subscriptions = (\model ->
        Sub.batch
          [ Time.every 1000 Msg.UpdateTime
          , Sub.map Msg.Tooltip Tooltip.subscription
          ]
      )
    }