from pos.pos import PosSys

def uiContext(user, menus):
    pos = PosSys.restoreStore(user)
    storeInfo = pos.uiSys.renderStoreInfo()

    ms = []
    for m in menus:
        ms.append(pos.uiSys.menu(m))

    ctx  = {
        'pos': pos,
        'info': storeInfo,
        'menus': ms
    }
    return ctx
