import ' rollup-plugin-inject-process-env';
import { ChatUserInfo } from "@xapp/stentor-chat-widget";
import { ChatServerActionLink } from "../xapp/ChatServerMessage";
import { ACCOUNT_STATUS_TYPE, ChatDetail, CONNECTION_STATUS_TYPE, DepartmentUpdateDetail } from "./ChatAction";
interface ChatDepartments {
    [id: string]: DepartmentUpdateDetail;
}
export interface ChatAgents {
    readonly [nick: string]: ChatAgentInfo | undefined;
}
export interface ChatAgentInfo {
    readonly typing: boolean;
    readonly user: ChatUserInfo;
    readonly joined: boolean;
    readonly requestFailed?: boolean;
    /** When true, hides user name and avatar when avatarPosition is "bottom". Set by the join event. */
    readonly hideUserInfo?: boolean;
}
export interface ChatFailureMsgDetail {
    delay: number;
    text: string;
}
export interface WebSocketButton {
    /**
     * Unique identifier for the button
     */
    readonly id: string;
    /**
     * Text to display on the button
     */
    readonly text: string;
    /**
     * Behavior when button is pressed
     */
    readonly pressBehavior: "disabled" | "spinning" | "none";
    /**
     * Whether the button is currently in a pressed state (for spinning)
     */
    readonly isPressed?: boolean;
    /**
     * Whether the button is animating out before being dismissed
     */
    readonly isDismissing?: boolean;
}
export interface ChatState {
    readonly connection: ConnectionState;
    accountStatus: ACCOUNT_STATUS_TYPE;
    departments: ChatDepartments;
    visitor: ChatUserInfo;
    /**
     * Available agents in the chat
     */
    readonly agents: ChatAgents;
    chats: ChatDetail[];
    lastTimestamp: number;
    lastRatingRequestTimestamp: number;
    hasRating: boolean;
    isChatting: boolean;
    queuePosition: number;
    failureMsg: ChatFailureMsgDetail;
    chips: (string | ChatServerActionLink)[];
    /**
     * @deprecated Use userId
     */
    visitorId: string;
    /**
     * ID to be used for the user
     */
    userId?: string;
    /**
     * Users access token for making authenticated API calls.
     */
    accessToken?: string;
    /**
     * Current active contexts
     */
    activeContexts?: readonly string[];
    /**
     * Attributes to be sent on every request.
     */
    attributes?: Record<string, unknown>;
    /**
     * ISO-8601 string for when the session expires
     */
    sessionExpiration?: string;
    visuals: VisualState;
    sessionId?: string;
    /**
     * Enable debug mode for error overlay
     */
    debugMode?: boolean;
    /**
     * WebSocket-driven button (appears above input)
     */
    wsButton?: WebSocketButton;
    /**
     * ID of the currently streaming message (for MCP streaming support)
     */
    streamingMessageId?: string;
}
export interface VisualState {
    visible?: boolean;
    opened?: boolean;
    drawer?: boolean;
    hasInteracted?: boolean;
}
export interface ConnectionState {
    readonly token: string | null;
    readonly connectionStatus: CONNECTION_STATUS_TYPE;
    readonly greetingRequested: boolean;
    readonly nonce?: string;
}
export {};
