import { DateTimeFormatter } from '@limetech/lime-web-components';
import { ChatItem } from './chat-item/chat-item.types';
import { ChatIconList } from './chat-icon-list/chat-icon-list.types';
import { ChatListItem } from './chat-list.types';
/**
 * Represents an item in the processed chat list.
 *
 * This can be one of the following types:
 * - `chat`: A standard chat item (speech bubble).
 * - `iconList`: A labeled row of icons.
 * - `newItemIndicator`: A line separating new items from old ones.
 * - `group`: A collection of items under a common heading (a date group).
 */
export type ProcessedItem = {
    type: 'chat';
    item: ChatItem;
} | {
    type: 'iconList';
    item: ChatIconList;
} | {
    type: 'newItemIndicator';
} | ChatGroup;
/**
 * Represents a group of items in the processed list.
 * Each group can contain other groups or items.
 */
export type ChatGroup = {
    type: 'group';
    groupType: string;
    heading: string;
    items: ProcessedItem[];
};
/**
 * Processes a list of chat list inputs by adding date headers and a "new items" indicator.
 *
 * @param items - The list of items to process. Pre-sorted by `timestamp` in ascending order.
 * @param dateTimeFormatter - A service used to format dates for the date headers.
 * @param lastVisitedTimestamp - The timestamp of the user's last visit. Used to position the
 *   "new items" indicator.
 *
 * @returns An array of processed items, including chat items, icon lists, date headers,
 *   and a "new items" indicator if applicable.
 */
export declare function processChatItems(items: ChatListItem[], dateTimeFormatter: DateTimeFormatter, lastVisitedTimestamp: Date | null): ProcessedItem[];
interface ProcessorContext {
    items: ChatListItem[];
    processedItems: ProcessedItem[];
    lastVisitedTimestamp: Date | null;
    dateTimeFormatter: DateTimeFormatter;
}
/**
 * Reverses the chronological order of a processed-items array.
 *
 * Pure two-level reverse: the top-level array is reversed, and each
 * group's items are reversed. `insertNewItemIndicator` places the
 * indicator at top level when the seen/unseen boundary falls
 * between groups, and only nests it inside a group when the
 * boundary falls within a single day — so reversal never needs to
 * move an indicator across levels to preserve its separator role.
 *
 * Used by `limebb-chat-list` when rendering in `newest-on-top`
 * layout, so that DOM order continues to match visual order
 * (newest-first in that layout), keeping copy/paste, screen-reader,
 * and tab order aligned with what the user sees.
 *
 * @param items - processed items in ascending-by-timestamp order
 * @returns processed items in descending-by-timestamp order
 */
export declare function reverseProcessedItems(items: ProcessedItem[]): ProcessedItem[];
/**
 *
 * @param context
 */
export declare function insertNotifications(context: ProcessorContext): ProcessorContext;
/**
 *
 * @param context
 */
export declare function insertNewItemIndicator(context: ProcessorContext): ProcessorContext;
/**
 *
 * @param context
 */
export declare function insertDateGroups(context: ProcessorContext): ProcessorContext;
export {};
//# sourceMappingURL=process-chat-items.d.ts.map