import { Texts, TrTr } from "./const/texts"
import { RTMT } from "./rtmt/rtmt"
import { RTMTWS } from "./rtmt/rtmt_websocket"
import { UserKeyStore, UserKeyStoreImpl } from "./store/key_store"

type Context = {
    rtmt : RTMT
    userKeyStore : UserKeyStore
    texts : Texts
}

export const initContext = ()=> {
    const rtmt =  new RTMTWS()
    const userKeyStore = new UserKeyStoreImpl()
    const texts = TrTr
    return {
        rtmt : rtmt,       
        userKeyStore : userKeyStore,
        texts : texts,
    }
}

export const context : Context = initContext()
