/** Resolve effective display mode for a frozen card.
 *  Legacy persisted values (e.g. `'text'` from pre-v2.4 cards) map to
 *  `'screenshot'` so old cards still render meaningfully. */
export function frozenDisplayMode(fc) {
    if (fc.displayMode === 'screenshot' || fc.displayMode === 'hidden')
        return fc.displayMode;
    return fc.expanded ? 'screenshot' : 'hidden';
}
/** Composite key for activeSessions — allows multiple bots to have independent
 *  sessions anchored on the same id. The first arg is the **routing anchor**:
 *  - thread-scope → rootMessageId
 *  - chat-scope   → chatId
 *  Lark message ids start with `om_` and chat ids with `oc_`, so collisions
 *  between the two address spaces are not possible. */
export function sessionKey(anchorId, larkAppId) {
    return `${anchorId}::${larkAppId}`;
}
/** Resolve the routing anchor for an active session — chatId for chat-scope
 *  sessions, rootMessageId for thread-scope. Used to compute `sessionKey()` at
 *  storage and lookup time. */
export function sessionAnchorId(ds) {
    return ds.scope === 'chat' ? ds.chatId : ds.session.rootMessageId;
}
//# sourceMappingURL=types.js.map