import type { ConnectionMetadata } from "@opengeni/sdk"; import type { ConnectedAccountGroup, ConnectionAccountChoices } from "./session-connection-accounts.js"; /** One of your own accounts this chat uses, however many times it is connected. */ export type OwnLoginInUse = { /** Stable for the account: its connector and its email (or its connection). */ key: string; /** The connector it is used through. */ serverId: string; /** The connector's name. */ connector: string; /** Who it signs in as, when the service says; empty otherwise. */ identity: string; /** Every connection of this account the chat would use (an account can be connected twice). */ accounts: ConnectionMetadata[]; /** The connector's name, plus the account when you use more than one account of it. */ label: string; }; /** Name each login by its connector, plus the account when one connector has * several here; accounts that can't be told apart by name are numbered. */ export declare function labelOwnLogins>(logins: readonly T[]): (T & { label: string; })[]; /** * The viewer's own logins this chat's next message would use: their accounts * among the chat's connectors, as chosen (no choice means every eligible * account). Each account counts once: connections of one connector that sign * in as the same email are one login. Any other connection stays on its own, * so different accounts never merge. */ export declare function ownLoginsInUse(groups: readonly ConnectedAccountGroup[], choices: ConnectionAccountChoices, subjectId: string): OwnLoginInUse[]; /** * The owner's quiet line in a chat shared with the workspace (D-54): how many * of their own logins work for their messages here ("2 personal connections * in this chat"), never which. It opens a menu with one switch per account, * the same turn-on and turn-off as the connector's own "Use for my messages * here", under one sentence: people here see what the agent does with them. * Whether a switch is on comes from the account list; a change shows at once * and the list decides again once it is done or fails. A login turned off in * this view stays in the menu, so it can go back on. It never blocks anything. */ export declare function OwnLoginsSharedHeadsUp({ logins: incoming, onChange, logoFor, className, }: { /** Your own logins that work for your messages here now (see `ownLoginsInUse`); * `null` while the list can't be read, which keeps the last one. */ logins: readonly OwnLoginInUse[] | null; /** Turn one account on or off here, and refresh the list; reject when it could not. */ onChange: (login: OwnLoginInUse, on: boolean) => Promise; /** The connector's logo, when known. */ logoFor?: ((login: OwnLoginInUse) => string | null) | undefined; className?: string | undefined; }): import("react").JSX.Element | null;