import type { MachineView, Session, SessionMachineAccess } from "@opengeni/sdk"; import { type ReactNode } from "react"; import { type UseSessionStartOptions } from "../hooks/use-session-start.js"; /** * Why a chat that runs on a personal machine can't take somebody's message, * with the ways forward. `queued` explains a saved message the runtime * refused; otherwise it warns about a draft before it is sent. */ export declare function PersonalMachineExplanation({ access, queued, action, }: { access: SessionMachineAccess; queued?: boolean | undefined; /** A machine picker or other way forward, shown before the copy-request button. */ action?: ReactNode | undefined; }): import("react").JSX.Element; /** * Before sending: the chat runs on somebody else's personal machine, so a new * message from this person could not start there. Renders nothing for the * machine's owner or when the chat is not on a personal machine. */ export declare function SessionMachineAccessNotice({ access, action, }: { access: SessionMachineAccess | null | undefined; action?: ReactNode | undefined; }): import("react").JSX.Element | null; export type SessionAdmissionNoticeProps = { session: Session; /** The person may pause, resume and recheck this session. */ canControl: boolean; /** The session is paused; rechecking would not clear that. */ paused: boolean; /** Another control action is in flight. */ busy: boolean; /** Control changed underneath the notice: re-read before any recheck. */ refreshRequired?: boolean | undefined; /** One fenced Resume followed by a fresh read (see `recheckSessionAdmission`). */ onRecheck: () => Promise; /** The session's current personal-machine projection, when known. */ machineAccess?: SessionMachineAccess | null | undefined; /** The machine picker offered when the saved message needs a different machine. */ machineAction?: ReactNode | undefined; }; /** * The runtime refused to start the session's next message (an admission * block). Says why in the person's language, keeps the saved message, and * offers the one safe way forward: choose a machine they can use, or recheck * after access changes. Renders nothing when the session is not blocked. */ export declare function SessionAdmissionNotice({ session, canControl, paused, busy, refreshRequired, onRecheck, machineAccess, machineAction, }: SessionAdmissionNoticeProps): import("react").JSX.Element | null; export type SessionMachineChoicesProps = { /** Machines the saved message can move to; see `savedMessageMachineChoices`. */ machines: readonly MachineView[]; /** Move the chat; resolve to an error to show, or null once it moved. */ onChoose: (machine: MachineView) => Promise; disabled?: boolean | undefined; /** A more specific reason for the last failed move (for example, the machine went offline). */ failureDetail?: string | null | undefined; }; /** * A compact "Choose machine" disclosure listing the machines the person may * move the chat to. Moving never resends anything: the saved message runs only * after an explicit recheck. */ export declare function SessionMachineChoices({ machines, onChoose, disabled, failureDetail, }: SessionMachineChoicesProps): import("react").JSX.Element; export type SessionStartNoticeProps = UseSessionStartOptions & { /** The person may control this session. The server enforces it either way. */ canControl?: boolean | undefined; /** Another control action (send, pause, resume) is in flight. */ busy?: boolean | undefined; /** Warn before sending when the chat runs on somebody else's personal machine. */ showPreSendWarning?: boolean | undefined; }; /** * Everything a chat embedding needs to explain why a message can't start: * the admission block for a saved message the runtime refused and, before * sending, the personal-machine warning. Offers the machines the person may * use, moves the chat, and rechecks with one fenced Resume, so the saved * message is kept and never sent twice. Access control is the server's; this * only explains it and offers the allowed ways forward. Every word comes from * the message catalog (`sessionAdmission.*`). */ export declare function SessionStartNotice({ canControl, busy, showPreSendWarning, ...options }: SessionStartNoticeProps): import("react").JSX.Element | null;