import { type ReactNode } from 'react'; import { type OpenMenu } from '../../components/ContextMenu.js'; import type { MenuEntry } from '../../components/MenuEntries.js'; import type { ConversationSummary } from '../types.js'; export type ConversationGroupKey = 'groupToday' | 'groupYesterday' | 'groupThisWeek' | 'groupThisMonth' | 'groupOlder'; /** Conversations by how long ago they last changed, the time each row shows, * newest group first, leaving out the groups with none. Each key names its * label in the sidebar strings. */ export declare function groupConversationsByDate(conversations: T[]): { key: ConversationGroupKey; items: T[]; }[]; /** What a conversation row offers behind its menu (rename, share, download, * delete) and the menu and dialogs that carry them out, for any list of * conversations. Render `overlays` once beside the list. Given the row, a * delete moves focus on to the next row. */ export declare function useConversationActions(): { menuItems: (conv: ConversationSummary, row?: Element) => MenuEntry[]; openMenu: OpenMenu; overlays: ReactNode; };