import { type LucideIcon } from 'lucide-react'; import * as React from 'react'; export type HistoryEventType = 'create' | 'update-fields' | 'reassign' | 'tags' | 'attachment' | 'comment' | 'delete-comment' | 'delete-record'; export type HistoryActorKind = 'person' | 'external' | 'bot'; export type HistoryTone = 'primary' | 'success' | 'info' | 'warning' | 'destructive' | 'muted'; export type HistoryPriority = 'low' | 'medium' | 'important' | 'urgent'; export type HistoryValueState = 'current' | 'previous' | 'added' | 'removed'; export type HistoryHeaderActionId = 'filter' | 'expand' | 'close'; export interface HistoryActor { id: string; name: string; avatarSrc?: string; fallback?: string; kind?: HistoryActorKind; } export interface HistoryPersonValue { id: string; name: string; avatarSrc?: string; fallback?: string; } export type HistoryValueToken = { type: 'status'; label: string; tone?: Exclude; } | { type: 'priority'; label: string; priority?: HistoryPriority; } | { type: 'person'; person: HistoryPersonValue; } | { type: 'date'; value: string; } | { type: 'number'; value: number | string; unit?: string; } | { type: 'tag'; label: string; tone?: HistoryTone; } | { type: 'boolean'; value: boolean; trueLabel?: string; falseLabel?: string; } | { type: 'file'; name: string; extension?: string; } | { type: 'text'; value: string; } | { type: 'empty'; label?: string; }; export interface HistoryFieldChange { id: string; label: string; from?: HistoryValueToken; to?: HistoryValueToken; added?: HistoryValueToken[]; removed?: HistoryValueToken[]; } interface HistoryEventBase { id: string; actor: HistoryActor; timestamp: string; dateTime?: string; actorFlags?: string[]; defaultExpanded?: boolean; } export interface HistoryCreateEvent extends HistoryEventBase { type: 'create'; actionLabel?: string; target: string; } export interface HistoryDeleteRecordEvent extends HistoryEventBase { type: 'delete-record'; actionLabel?: string; target: string; } export interface HistoryUpdateFieldsEvent extends HistoryEventBase { type: 'update-fields'; summaryLabel?: string; changes: HistoryFieldChange[]; } export interface HistoryReassignEvent extends HistoryEventBase { type: 'reassign'; fieldLabel?: string; from?: HistoryPersonValue[]; to: HistoryPersonValue[]; } export interface HistoryTagsEvent extends HistoryEventBase { type: 'tags'; fieldLabel?: string; added?: HistoryValueToken[]; removed?: HistoryValueToken[]; } export interface HistoryAttachmentEvent extends HistoryEventBase { type: 'attachment'; fieldLabel?: string; added?: HistoryValueToken[]; removed?: HistoryValueToken[]; } export interface HistoryCommentEvent extends HistoryEventBase { type: 'comment'; comment: string; } export interface HistoryDeleteCommentEvent extends HistoryEventBase { type: 'delete-comment'; commentAuthor: HistoryPersonValue; originalText?: string; actionLabel?: string; } export type HistoryEvent = HistoryCreateEvent | HistoryUpdateFieldsEvent | HistoryReassignEvent | HistoryTagsEvent | HistoryAttachmentEvent | HistoryCommentEvent | HistoryDeleteCommentEvent | HistoryDeleteRecordEvent; export interface HistoryGroup { id: string; label: string; events: HistoryEvent[]; } export interface HistoryHeaderAction { id: HistoryHeaderActionId; label?: string; onClick?: () => void; disabled?: boolean; } export interface HistoryProps extends Omit, 'children'> { title?: string; groups: HistoryGroup[]; actions?: HistoryHeaderAction[]; loading?: boolean; ariaLabel?: string; emptyMessage?: string; collapsibleChangeThreshold?: number; autoExpandNewestLargeEdit?: boolean; expandedEventIds?: string[]; defaultExpandedEventIds?: string[]; onExpandedEventIdsChange?: (ids: string[]) => void; } declare const historyEventCategoryConfig: { create: { label: string; Icon: LucideIcon; badgeClassName: string; actionClassName: string; }; 'update-fields': { label: string; Icon: LucideIcon; badgeClassName: string; actionClassName: string; }; reassign: { label: string; Icon: LucideIcon; badgeClassName: string; actionClassName: string; }; tags: { label: string; Icon: LucideIcon; badgeClassName: string; actionClassName: string; }; attachment: { label: string; Icon: LucideIcon; badgeClassName: string; actionClassName: string; }; comment: { label: string; Icon: LucideIcon; badgeClassName: string; actionClassName: string; }; 'delete-comment': { label: string; Icon: LucideIcon; badgeClassName: string; actionClassName: string; }; 'delete-record': { label: string; Icon: LucideIcon; badgeClassName: string; actionClassName: string; }; }; declare const historyHeaderActionConfig: { filter: { label: string; Icon: LucideIcon; }; expand: { label: string; Icon: LucideIcon; }; close: { label: string; Icon: LucideIcon; }; }; interface HistoryValueProps { value: HistoryValueToken; state?: HistoryValueState; className?: string; } declare function HistoryValue({ value, state, className, }: HistoryValueProps): React.JSX.Element; declare const History: React.ForwardRefExoticComponent>; export { History, HistoryValue, historyEventCategoryConfig, historyHeaderActionConfig, };