module IHP.ApplicationContext where

import IHP.Prelude
import Network.Wai.Session (Session)
import qualified Data.Vault.Lazy as Vault
import IHP.AutoRefresh.Types (AutoRefreshServer)
import IHP.FrameworkConfig (FrameworkConfig)

data ApplicationContext = ApplicationContext
    { ApplicationContext -> ModelContext
modelContext :: !ModelContext
    , ApplicationContext -> Key (Session IO String String)
session :: !(Vault.Key (Session IO String String))
    , ApplicationContext -> IORef AutoRefreshServer
autoRefreshServer :: !(IORef AutoRefreshServer)
    , ApplicationContext -> FrameworkConfig
frameworkConfig :: !FrameworkConfig
    }