import type { CalendarDateGroup, CalendarEvent } from './calendar';
export declare const parseTimeToMinutes: (value: string) => number;
export declare const toDateValue: (value?: string | Date) => Date;
export declare const toInternalDateValue: (value?: string | Date) => Date;
export declare const normalizeDateLikeValue: (value: unknown) => unknown;
export declare const toCalendarEvent: (event: CalendarEvent) => CalendarEvent;
export declare const toCalendarEvents: (events: CalendarEvent[]) => CalendarEvent[];
export declare const normalizeEventValue: (value: unknown) => unknown;
export declare const getEventsSignature: (events: CalendarEvent[]) => string;
export declare const isSameEvents: (left: CalendarEvent[], right: CalendarEvent[]) => boolean;
export declare const isEventOverlappingRange: (event: CalendarEvent, rangeStart: Date, rangeEnd: Date) => boolean;
export declare const isCrossDayEvent: (event: CalendarEvent) => boolean;
export declare const getCrossDaySortMetrics: (event: CalendarEvent) => {
    spanDays: number;
    durationMinutes: number;
    startAt: number;
};
export declare const formatEventDateTime: (date: Date) => string;
export declare const formatEventTime: (date: Date) => string;
export declare const getEventStartTimestamp: (event: CalendarEvent) => number;
export declare const getEventDurationMinutes: (event: CalendarEvent) => number;
export declare const getEventSpanDays: (event: CalendarEvent) => number;
export declare const clamp: (value: number, min: number, max: number) => number;
export declare const toEditDate: (value: unknown) => Date;
export declare const createDraftClassToken: () => string;
export declare const mergeClassName: (currentClass: CalendarEvent['class'], nextToken: string) => string;
export declare const stripClassName: (currentClass: CalendarEvent['class'], removeToken: string) => string;
export declare const hasClassToken: (currentClass: CalendarEvent['class'], token: string) => boolean;
export declare const isToday: (date: Date) => boolean;
export declare const hasActiveTextSelection: () => boolean;
/**
 * 将公历日期转换为农历日期字符串。
 * - 农历初一返回月份名称（如"正月"、"腊月"）
 * - 其余日期返回日期名称（如"初二"、"十五"）
 */
export declare const getLunarDate: (date: Date | string) => string;
/**
 * 宽容地将任意「类日期」值解析为原生 Date：
 * 支持 Date / dayjs / 秒级或毫秒级时间戳 / ISO 字符串；无法解析返回 null。
 */
export declare const toDateLike: (value: unknown) => Date | null;
/** Date → "YYYY-MM-DD HH:mm:ss" */
export declare const formatDateGroupDateTime: (date: Date) => string;
/**
 * 用 `{字段名}` 占位符模板生成标题，format 为空时回退到 record.title。
 */
export declare const applyDateGroupTitleFormat: (record: Record<string, any>, format?: string) => string;
/** 过滤出可用的日期组（启用 + 含 id + 含 startField）。 */
export declare const getEnabledDateGroups: (groups?: CalendarDateGroup[]) => CalendarDateGroup[];
/** 生成派生事件复合 ID：`${rawRecordId}_${groupId}`。 */
export declare const buildCompositeEventId: (rawRecordId: string, groupId: string) => string;
/**
 * 将一批原始记录按日期组展开为多条派生事件。
 *
 * @param records 原始数据列表
 * @param groups  已过滤的可用日期组（调用方负责 getEnabledDateGroups）
 * @param format  标题占位符模板
 */
export declare const buildDateGroupEvents: (records: CalendarEvent[], groups: CalendarDateGroup[], format?: string) => CalendarEvent[];
/**
 * 解析复合事件 ID，返回 { rawRecordId, groupId }；
 * 无法识别（不含分隔符）时 groupId 为 null。
 */
export declare const parseCompositeEventId: (id: string | number | undefined, groups: CalendarDateGroup[]) => {
    rawRecordId: string;
    groupId: string | null;
};
/**
 * 将（被基础组件编辑/拖拽过的）派生事件折叠回原始记录列表。
 *
 * - 派生事件依据复合 ID 解析出 rawRecordId/groupId，把 start/end 写回对应字段；
 * - 派生事件携带的其它字段（除内部标记/渲染字段）一并合并回原始记录；
 * - 派生事件的「消失」视为对应原始记录被删除（其所有派生事件均不在列表中时移除记录）；
 * - 非派生事件（用户在日历内新建、或本就是原生 start/end 记录）原样保留。
 *
 * @param events    当前展示层事件列表（可能被编辑过）
 * @param baseRecords 上一次的原始记录列表，用于保留未展示字段与判定删除
 * @param groups    已过滤的可用日期组
 */
export declare const foldDateGroupEvents: (events: CalendarEvent[], baseRecords: CalendarEvent[], groups: CalendarDateGroup[]) => CalendarEvent[];
