import * as React from 'react'; import type { DialogItem } from './types/component.types'; /** Ownership scope of the rail's dialog list — the current user's chats only, * or every admin's chats in the tenant. */ export type MingoHistoryScope = 'my' | 'all'; export interface MingoHistoryRailProps { /** Dialogs to list, assumed already sorted newest-first by the host. */ dialogs: ReadonlyArray; /** Currently-open dialog id (highlighted). */ activeDialogId?: string; /** Open a dialog. */ onSelectDialog?: (id: string) => void; /** Start a fresh chat — clears the open conversation so the chat block shows * the welcome. Rendered as the pinned "Start New Chat" button above the list, * in every state (including the no-chats empty state). */ onNewChat?: () => void; /** Request rename — enables the row "Rename chat" action. */ onRequestRename?: (dialog: DialogItem) => void; /** Request archive — enables the row "Archive chat" action. */ onRequestArchive?: (dialog: DialogItem) => void; /** Request a shareable link — enables the row "Copy chat link" action. */ onRequestCopyLink?: (dialog: DialogItem) => void; /** Ownership scope shown as a two-state "My Chats / All Chats" selector * between "Start New Chat" and the list. Rendered only when BOTH `scope` * and `onScopeChange` are provided; the host owns the state and refilters * the `dialogs` it passes in. */ scope?: MingoHistoryScope; /** Scope selector change handler — see `scope`. */ onScopeChange?: (scope: MingoHistoryScope) => void; /** Current server-side search term. Drives the list's "No chats found" * empty state; the search INPUT itself lives in the panel header now, not * in the rail body. */ searchQuery?: string; /** Whether more dialogs remain (cursor pagination). */ hasMore?: boolean; /** True while the next page is loading. */ isLoadingMore?: boolean; /** Fetch the next page. */ onLoadMore?: () => void; /** True while the FIRST page of dialogs is still loading. Renders a skeleton * so the rail doesn't flash the empty state before the list arrives. */ isLoadingHistory?: boolean; /** The dialog-list load FAILED with nothing cached — renders an error + retry * block instead of the empty state. */ loadError?: boolean; /** Retry handler for the `loadError` state. */ onRetry?: () => void; /** Appended to the root element. */ className?: string; } /** * MingoHistoryRail — the persistent "Current Chats" left column of the split * (wide) Mingo layout (Figma 113:60931 / 113:63630). * * The dialog history that the stacked layout renders inline in the Mingo empty * state is hoisted here into a fixed-width rail beside the chat block. On top * sits a pinned "Start New Chat" button (always shown when `onNewChat` is * given); below it the grouped Today / Yesterday / Older list * (`MingoChatHistory`). With no chats the list area collapses to a centred * empty state; loading / error states mirror the stacked empty state so the * two layouts stay consistent. */ export declare function MingoHistoryRail({ dialogs, activeDialogId, onSelectDialog, onNewChat, onRequestRename, onRequestArchive, onRequestCopyLink, scope, onScopeChange, searchQuery, hasMore, isLoadingMore, onLoadMore, isLoadingHistory, loadError, onRetry, className, }: MingoHistoryRailProps): React.JSX.Element; //# sourceMappingURL=mingo-history-rail.d.ts.map