import { DateTimeFormatter } from '@limetech/lime-web-components';
import { NotificationItem } from './notification-item/notification-item.types';
/**
 * Represents an item in the processed notification list.
 *
 * This can be one of the following types:
 * - `notification`: A standard notification item.
 * - `newItemIndicator`: A line separating new notifications from old ones.
 * - `group`: A collection of notifications or subgroups under a common heading.
 */
export type ProcessedItem = {
    type: 'notification';
    item: NotificationItem;
} | {
    type: 'newItemIndicator';
} | NotificationGroup;
/**
 * Represents a group of notifications in the processed list.
 * Each group can contain other groups or notifications.
 */
export type NotificationGroup = {
    type: 'group';
    groupType: string;
    heading: string;
    items: ProcessedItem[];
};
/**
 * Processes a list of notifications by adding date headers and a "new items" indicator.
 *
 * @param items - The list of notification items to process. These items must be pre-sorted by their `timestamp` in descending order.
 * @param dateTimeFormatter - A service used to format dates for the date headers.
 * @param lastVisitedTimestamp - The timestamp of the user's last visit. This is used to determine where the "new items" indicator should be placed.
 *
 * @returns An array of processed items, including notifications, date headers, and a "new items" indicator if applicable.
 *
 * @example
 * const processedItems = processNotificationItems(
 *     notifications,
 *     dateTimeFormatter,
 *     new Date('2024-09-01T10:00:00Z')
 * );
 *
 * // Output: [
 * //   { type: 'dateHeader', date: '2024-09-01' },
 * //   { type: 'notification', item: notification1 },
 * //   { type: 'notification', item: notification2 },
 * //   { type: 'newItemIndicator' },
 * //   { type: 'dateHeader', date: '2024-08-31' },
 * //   { type: 'notification', item: notification3 },
 * // ]
 */
export declare function processNotificationItems(items: NotificationItem[], dateTimeFormatter: DateTimeFormatter, lastVisitedTimestamp: Date | null): ProcessedItem[];
interface ProcessorContext {
    items: NotificationItem[];
    processedItems: ProcessedItem[];
    lastVisitedTimestamp: Date | null;
    dateTimeFormatter: DateTimeFormatter;
    newItemIndicatorInserted: boolean;
    lastProcessedDate: string | null;
    hasUnseenNotifications: boolean;
}
/**
 *
 * @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-notification-items.d.ts.map