import React__default from 'react';
import { DragStartEvent, DragOverEvent, DragEndEvent } from '@dnd-kit/core';

/**
 * 日历模块类型定义
 *
 * 定义了日历模块中使用的所有TypeScript类型，包括：
 * - 事件相关类型
 * - 日历视图类型
 * - 重复规则类型
 * - 提醒类型
 * - API响应类型
 * - 组件Props类型
 */
/**
 * 日历事件
 */
interface CalendarEvent {
    id: number;
    title: string;
    description?: string;
    startTime: Date;
    endTime: Date;
    allDay: boolean;
    location?: string;
    color: string;
    priority: EventPriority;
    userId: number;
    createdAt: Date;
    updatedAt: Date;
    recurrenceRule?: RecurrenceRule$1;
    reminders?: Reminder[];
}
/**
 * 重复规则
 */
interface RecurrenceRule$1 {
    id: number;
    eventId: number;
    ruleType: RecurrenceType;
    interval: number;
    endDate?: Date;
    count?: number;
    byWeekday?: number[];
    byMonthday?: number[];
    byMonth?: number[];
}
/**
 * 提醒
 */
interface Reminder {
    id: number;
    eventId: number;
    reminderTime: Date;
    reminderType: ReminderType;
    status: ReminderStatus;
    createdAt: Date;
}
/**
 * 重复类型
 */
declare enum RecurrenceType {
    DAILY = "daily",
    WEEKLY = "weekly",
    MONTHLY = "monthly",
    YEARLY = "yearly",
    CUSTOM = "custom"
}
/**
 * 提醒类型
 */
declare enum ReminderType {
    NOTIFICATION = "notification",
    EMAIL = "email",
    SMS = "sms"
}
/**
 * 提醒状态
 */
declare enum ReminderStatus {
    PENDING = "pending",
    SENT = "sent",
    FAILED = "failed"
}
/**
 * 日历视图类型
 */
declare enum CalendarViewType {
    MONTH = "month",
    WEEK = "week",
    DAY = "day",
    AGENDA = "agenda"
}
/**
 * 事件颜色预设
 */
declare enum EventColor {
    BLUE = "#3B82F6",
    GREEN = "#10B981",
    PURPLE = "#8B5CF6",
    RED = "#EF4444",
    YELLOW = "#F59E0B",
    PINK = "#EC4899",
    INDIGO = "#6366F1",
    GRAY = "#6B7280"
}
/**
 * 事件优先级
 */
declare enum EventPriority {
    LOW = "low",
    NORMAL = "normal",
    HIGH = "high",
    URGENT = "urgent"
}
/**
 * 事件表单数据
 */
interface EventFormData {
    title: string;
    description?: string;
    startTime: Date;
    endTime: Date;
    allDay: boolean;
    location?: string;
    color: string;
    priority: EventPriority;
    recurrence?: RecurrenceFormData;
    reminders?: ReminderFormData[];
}
/**
 * 重复规则表单数据
 */
interface RecurrenceFormData {
    ruleType: RecurrenceType;
    interval: number;
    endDate?: Date;
    count?: number;
    byWeekday?: number[];
    byMonthday?: number[];
    byMonth?: number[];
}
/**
 * 提醒表单数据
 */
interface ReminderFormData {
    reminderTime: Date;
    reminderType: ReminderType;
}
/**
 * API提醒数据
 */
interface ReminderApiData {
    reminderTime: string;
    reminderType: ReminderType;
}
/**
 * 创建事件请求
 */
interface CreateEventRequest {
    title: string;
    description?: string;
    startTime: string;
    endTime: string;
    allDay: boolean;
    location?: string;
    color: string;
    priority: EventPriority;
    recurrence?: RecurrenceFormData;
    reminders?: ReminderApiData[];
}
/**
 * 更新事件请求
 */
interface UpdateEventRequest {
    title?: string;
    description?: string;
    startTime?: string;
    endTime?: string;
    allDay?: boolean;
    location?: string;
    color?: string;
    priority?: EventPriority;
    recurrence?: RecurrenceFormData;
    reminders?: ReminderApiData[];
}
/**
 * 删除事件请求
 */
interface DeleteEventRequest {
    id: number;
    deleteAll?: boolean;
}
/**
 * 获取事件请求参数
 */
interface GetEventsRequest {
    startDate: string;
    endDate: string;
    viewType?: CalendarViewType;
    userId?: number;
}
/**
 * API响应基础类型
 */
interface ApiResponse<T = any> {
    success: boolean;
    data?: T;
    error?: string;
    message?: string;
}
/**
 * 事件列表响应
 */
interface EventsResponse extends ApiResponse<CalendarEvent[]> {
}
/**
 * 单个事件响应
 */
interface EventResponse extends ApiResponse<CalendarEvent> {
}
/**
 * 日历视图组件Props
 */
interface CalendarViewProps {
    events: CalendarEvent[];
    viewType: CalendarViewType;
    currentDate: Date;
    onDateChange: (date: Date) => void;
    onViewTypeChange: (viewType: CalendarViewType) => void;
    onEventClick: (event: CalendarEvent) => void;
    onEventCreate: (event: EventFormData) => void;
    onEventUpdate: (event: CalendarEvent) => void;
    onEventDelete: (eventId: number) => void;
    loading?: boolean;
    className?: string;
}
/**
 * 事件卡片组件Props
 */
interface EventCardProps {
    event: CalendarEvent;
    onClick?: (event: CalendarEvent) => void;
    onEdit?: (event: CalendarEvent) => void;
    onDelete?: (eventId: number) => void;
    compact?: boolean;
    className?: string;
}
/**
 * 事件表单组件Props
 */
interface EventFormProps$1 {
    event?: CalendarEvent;
    onSubmit: (eventData: EventFormData) => void;
    onCancel: () => void;
    loading?: boolean;
    className?: string;
}
/**
 * 事件弹窗组件Props
 */
interface EventModalProps$1 {
    isOpen: boolean;
    event?: CalendarEvent;
    onClose: () => void;
    onSave: (eventData: EventFormData) => void;
    onDelete?: (eventId: number) => void;
    loading?: boolean;
}
/**
 * 迷你日历组件Props
 */
interface MiniCalendarProps {
    selectedDate: Date;
    onDateSelect: (date: Date) => void;
    events?: CalendarEvent[];
    highlightDatesWithEvents?: boolean;
    className?: string;
}
/**
 * 日历状态
 */
interface CalendarState {
    events: CalendarEvent[];
    currentDate: Date;
    viewType: CalendarViewType;
    selectedEvent?: CalendarEvent;
    loading: boolean;
    error?: string;
}
/**
 * 日历操作类型
 */
interface CalendarActions {
    setEvents: (events: CalendarEvent[]) => void;
    addEvent: (event: CalendarEvent) => void;
    updateEvent: (event: CalendarEvent) => void;
    deleteEvent: (eventId: number) => void;
    setCurrentDate: (date: Date) => void;
    setViewType: (viewType: CalendarViewType) => void;
    setSelectedEvent: (event?: CalendarEvent) => void;
    setLoading: (loading: boolean) => void;
    setError: (error?: string) => void;
}
/**
 * useCalendar Hook返回类型
 */
interface UseCalendarReturn {
    state: CalendarState;
    actions: CalendarActions;
    loadEvents: (startDate: Date, endDate: Date) => Promise<void>;
    createEvent: (eventData: EventFormData) => Promise<CalendarEvent>;
    updateEvent: (eventId: number, eventData: Partial<EventFormData>) => Promise<CalendarEvent>;
    deleteEvent: (eventId: number, deleteAll?: boolean) => Promise<void>;
    refreshEvents: () => Promise<void>;
}
/**
 * useEvents Hook返回类型
 */
interface UseEventsReturn$1 {
    events: CalendarEvent[];
    loading: boolean;
    error?: string;
    createEvent: (eventData: EventFormData) => Promise<CalendarEvent>;
    updateEvent: (eventId: number, eventData: Partial<EventFormData>) => Promise<CalendarEvent>;
    deleteEvent: (eventId: number, deleteAll?: boolean) => Promise<void>;
    loadEvents: (startDate: Date, endDate: Date) => Promise<void>;
    refreshEvents: () => Promise<void>;
}
/**
 * 日期范围
 */
interface DateRange {
    startDate: Date;
    endDate: Date;
}
/**
 * 日历单元格数据
 */
interface CalendarCell {
    date: Date;
    isCurrentMonth: boolean;
    isToday: boolean;
    isSelected: boolean;
    events: CalendarEvent[];
}
/**
 * 时间槽数据
 */
interface TimeSlot {
    time: Date;
    events: CalendarEvent[];
    isWorkingHour: boolean;
}
/**
 * 日历配置
 */
interface CalendarConfig {
    firstDayOfWeek: number;
    workingHours: {
        start: string;
        end: string;
    };
    timeZone: string;
    dateFormat: string;
    timeFormat: string;
    defaultView: CalendarViewType;
    defaultEventColor: string;
    weekends: boolean;
    eventColors: Record<string, string>;
}
/**
 * 服务接口
 */
interface CalendarService {
    getEvents(params: GetEventsRequest): Promise<CalendarEvent[]>;
    createEvent(eventData: CreateEventRequest): Promise<CalendarEvent>;
    updateEvent(eventId: number, eventData: UpdateEventRequest): Promise<CalendarEvent>;
    deleteEvent(eventId: number, deleteAll?: boolean): Promise<void>;
    getEvent(eventId: number): Promise<CalendarEvent>;
}
/**
 * 数据库服务接口
 */
interface CalendarDbService {
    getAllEvents(userId: number, startDate?: Date, endDate?: Date): Promise<CalendarEvent[]>;
    getEventById(eventId: number): Promise<CalendarEvent | null>;
    createEvent(eventData: Omit<CalendarEvent, 'id' | 'createdAt' | 'updatedAt'>): Promise<CalendarEvent>;
    updateEvent(eventId: number, eventData: Partial<CalendarEvent>): Promise<CalendarEvent>;
    deleteEvent(eventId: number): Promise<void>;
    createRecurrenceRule(ruleData: Omit<RecurrenceRule$1, 'id'>): Promise<RecurrenceRule$1>;
    updateRecurrenceRule(ruleId: number, ruleData: Partial<RecurrenceRule$1>): Promise<RecurrenceRule$1>;
    deleteRecurrenceRule(ruleId: number): Promise<void>;
    createReminder(reminderData: Omit<Reminder, 'id' | 'createdAt'>): Promise<Reminder>;
    updateReminder(reminderId: number, reminderData: Partial<Reminder>): Promise<Reminder>;
    deleteReminder(reminderId: number): Promise<void>;
}
/**
 * 事件排序字段
 */
declare enum EventSortField {
    START_TIME = "startTime",
    TITLE = "title",
    PRIORITY = "priority",
    CREATED_AT = "createdAt",
    UPDATED_AT = "updatedAt"
}
/**
 * 排序方向
 */
declare enum SortDirection {
    ASC = "asc",
    DESC = "desc"
}
/**
 * 事件列表显示模式
 */
declare enum EventListDisplayMode {
    LIST = "list",
    GRID = "grid"
}
/**
 * 事件列表排序配置
 */
interface EventListSort {
    field: EventSortField;
    direction: SortDirection;
}
/**
 * 事件列表过滤配置
 */
interface EventListFilter {
    priority?: EventPriority;
    color?: string;
    dateRange?: DateRange;
    searchText?: string;
}
/**
 * 事件列表配置
 */
interface EventListConfig {
    displayMode: EventListDisplayMode;
    sort: EventListSort;
    filter: EventListFilter;
    pageSize: number;
    currentPage: number;
}
/**
 * 事件列表Props
 */
interface EventListProps {
    events: CalendarEvent[];
    config: EventListConfig;
    onConfigChange: (config: EventListConfig) => void;
    onEventClick: (event: CalendarEvent) => void;
    onEventEdit: (event: CalendarEvent) => void;
    onEventDelete: (eventId: number) => void;
    onBatchDelete?: (eventIds: number[]) => Promise<void>;
    enableBatchActions?: boolean;
    loading?: boolean;
    className?: string;
}

/**
 * 日历日期工具函数
 *
 * 提供日历模块中常用的日期处理功能，包括：
 * - 日期格式化
 * - 日期计算
 * - 日历视图相关的日期逻辑
 * - 重复事件计算
 */
/**
 * 格式化日期为 YYYY-MM-DD 格式
 * 使用本地时区，避免时区转换问题
 */
declare function formatDate(date: Date): string;
/**
 * 格式化时间为 HH:mm 格式
 */
declare function formatTime(date: Date): string;
/**
 * 格式化日期时间为本地字符串
 */
declare function formatDateTime(date: Date, options?: Intl.DateTimeFormatOptions): string;
/**
 * 将日期时间转换为ISO字符串，但保持本地时区
 * 避免时区转换导致的日期偏移问题
 */
declare function toLocalISOString(date: Date): string;
/**
 * 获取月份的第一天
 */
declare function getMonthStart(date: Date): Date;
/**
 * 获取月份的最后一天
 */
declare function getMonthEnd(date: Date): Date;
/**
 * 获取周的第一天（基于指定的一周开始日）
 */
declare function getWeekStart(date: Date, firstDayOfWeek?: number): Date;
/**
 * 获取周的最后一天
 */
declare function getWeekEnd(date: Date, firstDayOfWeek?: number): Date;
/**
 * 获取当天的开始时间
 */
declare function getDayStart(date: Date): Date;
/**
 * 获取当天的结束时间
 */
declare function getDayEnd(date: Date): Date;
/**
 * 检查两个日期是否在同一天
 */
declare function isSameDay(date1: Date, date2: Date): boolean;
/**
 * 检查两个日期是否在同一周
 */
declare function isSameWeek(date1: Date, date2: Date, firstDayOfWeek?: number): boolean;
/**
 * 检查两个日期是否在同一月
 */
declare function isSameMonth(date1: Date, date2: Date): boolean;
/**
 * 检查日期是否是今天
 */
declare function isToday(date: Date): boolean;
/**
 * 检查日期是否是周末
 */
declare function isWeekend(date: Date): boolean;
/**
 * 添加天数
 */
declare function addDays(date: Date, days: number): Date;
/**
 * 添加周数
 */
declare function addWeeks(date: Date, weeks: number): Date;
/**
 * 添加月数
 */
declare function addMonths(date: Date, months: number): Date;
/**
 * 添加年数
 */
declare function addYears(date: Date, years: number): Date;
/**
 * 获取月视图的日期网格
 */
declare function getMonthViewDates(date: Date, firstDayOfWeek?: number): Date[];
/**
 * 获取周视图的日期
 */
declare function getWeekViewDates(date: Date, firstDayOfWeek?: number): Date[];
/**
 * 生成时间槽（用于日视图和周视图）
 */
declare function generateTimeSlots(startHour?: number, endHour?: number, interval?: number): Date[];
/**
 * 解析日期字符串为Date对象
 */
declare function parseDate(dateString: string): Date;
/**
 * 获取两个日期之间的天数差
 */
declare function getDaysDifference(date1: Date, date2: Date): number;
/**
 * 检查时间是否在工作时间内
 */
declare function isWorkingHour(date: Date, workingStart?: string, workingEnd?: string): boolean;
/**
 * 获取月份名称
 */
declare function getMonthName(date: Date, locale?: string): string;
/**
 * 获取星期名称
 */
declare function getWeekdayName(date: Date, locale?: string, format?: 'long' | 'short' | 'narrow'): string;
/**
 * 获取相对时间描述（如"2小时前"、"明天"）
 */
declare function getRelativeTime(date: Date, locale?: string): string;
/**
 * 验证日期是否有效
 */
declare function isValidDate(date: any): date is Date;
/**
 * 克隆日期对象
 */
declare function cloneDate(date: Date): Date;

interface CalendarPageProps {
    /** 当前登录用户信息 */
    user?: {
        id: number;
        name?: string;
        [key: string]: any;
    } | null;
    /** 是否已认证 */
    isAuthenticated?: boolean;
    /** 触发登录的回调 */
    onShowLogin?: () => void;
    /** 自定义页头操作区域（例如用户菜单） */
    headerActions?: React__default.ReactNode;
}
/**
 * 基础日历页面组件
 *
 * 这是一个简化版本的日历页面，用于在实验田中展示基本功能
 * 包含了基本的月历视图和事件显示
 */
declare function CalendarPage({ user, isAuthenticated, onShowLogin, headerActions }: CalendarPageProps): React__default.JSX.Element;

interface EventDetailPageProps {
    eventId: number;
    onBack?: () => void;
    onEdit?: (event: CalendarEvent) => void;
    onDelete?: (eventId: number) => void;
}
declare const EventDetailPage: React__default.FC<EventDetailPageProps>;

interface EventFormProps {
    /** 初始事件数据（编辑模式） */
    initialData?: Partial<EventFormData>;
    /** 是否为编辑模式 */
    isEdit?: boolean;
    /** 表单提交回调 */
    onSubmit: (data: EventFormData) => void;
    /** 取消回调 */
    onCancel: () => void;
    /** 是否正在加载 */
    loading?: boolean;
}
/**
 * 事件表单组件
 *
 * 用于创建和编辑日历事件的表单组件
 * 支持基本信息、重复规则、提醒设置等功能
 */
declare function EventForm({ initialData, isEdit, onSubmit, onCancel, loading }: EventFormProps): React__default.JSX.Element;

interface EventModalProps {
    isOpen: boolean;
    onClose: () => void;
    onSave: (eventData: CreateEventRequest | UpdateEventRequest) => Promise<void>;
    onDelete?: (eventId: number) => Promise<void>;
    event?: CalendarEvent | null;
    initialDate?: Date;
}
declare const EventModal: React__default.FC<EventModalProps>;

/**
 * 事件列表组件
 * 支持列表/网格显示模式、排序、批量选择和批量删除
 */
declare function EventList({ events, config, onConfigChange, onEventClick, onEventEdit, onEventDelete, onBatchDelete, enableBatchActions, loading, className }: EventListProps): React__default.JSX.Element;

interface EventSearchProps {
    events: CalendarEvent[];
    onFiltered: (filteredEvents: CalendarEvent[]) => void;
    className?: string;
}
declare const EventSearch: React__default.FC<EventSearchProps>;

interface DraggableEventProps {
    event: CalendarEvent;
    isDragging?: boolean;
    className?: string;
    onClick?: () => void;
    children?: React__default.ReactNode;
}
/**
 * 可拖拽的事件组件
 *
 * 功能特性：
 * - 支持拖拽移动事件（桌面端）
 * - 移动端禁用拖拽功能
 * - 拖拽时显示半透明效果
 * - 保持原有的点击功能
 * - 响应式设计
 */
declare const DraggableEvent: React__default.FC<DraggableEventProps>;

interface DroppableCalendarCellProps {
    date: Date;
    events: CalendarEvent[];
    isCurrentMonth: boolean;
    isSelected?: boolean;
    dragOverPreview?: string | null;
    onEventClick?: (event: CalendarEvent) => void;
    onDateClick?: (date: Date) => void;
    className?: string;
    disableDrop?: boolean;
}
/**
 * 可放置的日历单元格组件
 *
 * 功能特性：
 * - 支持拖拽事件到此日期
 * - 显示当前日期的所有事件
 * - 拖拽悬停时显示预览
 * - 响应式设计
 */
declare const DroppableCalendarCell: React__default.FC<DroppableCalendarCellProps>;

interface DraggableMonthViewProps {
    events: CalendarEvent[];
    currentDate: Date;
    onDateChange: (date: Date) => void;
    onEventClick?: (event: CalendarEvent) => void;
    onDateClick?: (date: Date) => void;
    onEventUpdate: (eventId: number, newStartTime: Date, newEndTime: Date) => Promise<void>;
    className?: string;
}
/**
 * 支持拖拽的月视图组件
 *
 * 功能特性：
 * - 完整的月视图日历
 * - 事件拖拽功能（桌面端）
 * - 移动端禁用拖拽，优化触摸体验
 * - 拖拽预览和反馈
 * - 月份导航
 * - 响应式设计
 */
declare const DraggableMonthView: React__default.FC<DraggableMonthViewProps>;

interface UseEventsReturn {
    events: CalendarEvent[];
    loading: boolean;
    error?: string;
    createEvent: (eventData: EventFormData) => Promise<CalendarEvent>;
    updateEvent: (eventId: number, eventData: Partial<EventFormData>) => Promise<CalendarEvent>;
    deleteEvent: (eventId: number, deleteAll?: boolean) => Promise<void>;
    batchDeleteEvents: (eventIds: number[]) => Promise<void>;
    fetchEvents: (startDate: Date, endDate: Date) => Promise<void>;
    clearError: () => void;
}
/**
 * 事件管理 Hook
 *
 * 提供事件的状态管理和CRUD操作
 */
declare function useEvents(): UseEventsReturn;

/**
 * 事件类型服务
 *
 * 负责处理不同类型事件的创建逻辑：
 * 1. 单次事件 (Single Event)
 * 2. 多天事件 (Multi-day Event)
 * 3. 重复事件 (Recurring Event)
 */
declare enum EventType {
    SINGLE = "single",// 单次事件
    MULTI_DAY = "multi_day",// 多天事件（跨越多个日期的单个事件）
    RECURRING = "recurring"
}
declare enum RecurrencePattern {
    DAILY = "daily",
    WEEKLY = "weekly",
    MONTHLY = "monthly",
    YEARLY = "yearly",
    CUSTOM = "custom"
}
interface BaseEventData {
    title: string;
    description?: string;
    location?: string;
    color: string;
    priority: string;
    allDay: boolean;
}
interface SingleEventData extends BaseEventData {
    type: EventType.SINGLE;
    startTime: Date;
    endTime: Date;
}
interface MultiDayEventData extends BaseEventData {
    type: EventType.MULTI_DAY;
    startDate: Date;
    endDate: Date;
    startTime?: string;
    endTime?: string;
}
interface RecurringEventData extends BaseEventData {
    type: EventType.RECURRING;
    startDate: Date;
    startTime: Date;
    endTime: Date;
    recurrence: {
        pattern: RecurrencePattern;
        interval: number;
        endDate?: Date;
        count?: number;
        daysOfWeek?: number[];
    };
}
type EventData = SingleEventData | MultiDayEventData | RecurringEventData;
interface GeneratedEvent {
    title: string;
    description?: string;
    startTime: Date;
    endTime: Date;
    location?: string;
    color: string;
    priority: string;
    allDay: boolean;
    eventType: EventType;
    parentEventId?: string;
    instanceDate?: string;
    isMultiDayPart?: boolean;
    isRecurringInstance?: boolean;
}
declare class EventTypeService {
    /**
     * 根据事件数据生成实际的事件实例
     */
    static generateEventInstances(eventData: EventData, viewStartDate: Date, viewEndDate: Date, parentEventId?: string): GeneratedEvent[];
    /**
     * 生成单次事件
     */
    private static generateSingleEvent;
    /**
     * 生成多天事件实例
     * 例：21-23号的会议 -> 创建3个事件实例，每个代表一天
     */
    private static generateMultiDayEvents;
    /**
     * 生成重复事件实例
     */
    private static generateRecurringEvents;
    /**
     * 计算下一次重复的日期
     */
    private static getNextRecurrenceDate;
    /**
     * 格式化日期为字符串 (YYYY-MM-DD)
     */
    private static formatDateString;
    /**
     * 验证事件数据
     */
    static validateEventData(eventData: EventData): string[];
    private static validateSingleEvent;
    private static validateMultiDayEvent;
    private static validateRecurringEvent;
    /**
     * 获取事件类型的描述文本
     */
    static getEventTypeDescription(eventData: EventData): string;
}

interface UseEnhancedEventsReturn {
    events: CalendarEvent[];
    loading: boolean;
    error?: string;
    createEvent: (eventData: EventFormData) => Promise<CalendarEvent>;
    createEnhancedEvent: (eventData: EventData) => Promise<CalendarEvent[]>;
    updateEvent: (eventId: number, eventData: Partial<EventFormData>) => Promise<CalendarEvent>;
    updateEventTime: (eventId: number, newStartTime: Date, newEndTime: Date) => Promise<void>;
    deleteEvent: (eventId: number, deleteAll?: boolean) => Promise<void>;
    batchDeleteEvents: (eventIds: number[]) => Promise<void>;
    fetchEvents: (startDate: Date, endDate: Date) => Promise<void>;
    clearError: () => void;
}
/**
 * 增强版事件管理 Hook
 *
 * 支持新的事件类型系统：单次事件、多天事件、重复事件
 */
declare function useEnhancedEvents(): UseEnhancedEventsReturn;

interface DragState {
    isDragging: boolean;
    draggedEvent: CalendarEvent | null;
    dragOverDate: Date | null;
    previewTime: string | null;
}
interface UseEventDragReturn {
    dragState: DragState;
    handleDragStart: (event: DragStartEvent) => void;
    handleDragOver: (event: DragOverEvent) => void;
    handleDragEnd: (event: DragEndEvent) => void;
    resetDragState: () => void;
}
/**
 * 事件拖拽Hook
 *
 * 提供事件拖拽功能，支持：
 * - 拖拽事件到不同日期
 * - 拖拽时显示预览信息
 * - 拖拽状态管理
 */
declare function useEventDrag(events: CalendarEvent[], onEventUpdate: (eventId: number, newStartTime: Date, newEndTime: Date) => Promise<void>): UseEventDragReturn;

/**
 * 日历导出服务
 *
 * 提供日历事件的导出功能，支持多种格式：
 * - iCal (.ics) 格式
 * - JSON 格式
 * - CSV 格式
 */

interface ExportOptions {
    format: 'ical' | 'json' | 'csv';
    dateRange?: {
        start: Date;
        end: Date;
    };
    includeCompleted?: boolean;
}
declare class CalendarExportService {
    /**
     * 导出事件到指定格式
     */
    static exportEvents(events: CalendarEvent[], options: ExportOptions): Promise<string>;
    /**
     * 导出为 iCal (.ics) 格式
     */
    private static exportToICal;
    /**
     * 导出为 JSON 格式
     */
    private static exportToJSON;
    /**
     * 导出为 CSV 格式
     */
    private static exportToCSV;
    /**
     * 下载导出的文件
     */
    static downloadFile(content: string, filename: string, mimeType: string): void;
    /**
     * 获导出方法的便捷函数
     */
    static exportAndDownload(events: CalendarEvent[], options: ExportOptions, filename?: string): Promise<void>;
    /**
     * 格式化日期时间为 iCal 格式
     */
    private static formatDateTimeToICal;
    /**
     * 转义 iCal 文本
     */
    private static escapeICalText;
    /**
     * 转义 CSV 字段
     */
    private static escapeCSVField;
}

/**
 * 日历导入服务
 *
 * 提供日历事件的导入功能，支持多种格式：
 * - iCal (.ics) 格式
 * - JSON 格式
 * - CSV 格式
 */

interface ImportOptions {
    format: 'ical' | 'json' | 'csv';
    overwriteExisting?: boolean;
    validateEvents?: boolean;
}
interface ImportResult {
    success: boolean;
    importedCount: number;
    errors: string[];
    events: CreateEventRequest[];
}
declare class CalendarImportService {
    /**
     * 从文件导入事件
     */
    static importFromFile(file: File, options: ImportOptions): Promise<ImportResult>;
    /**
     * 从内容字符串导入事件
     */
    static importFromContent(content: string, options: ImportOptions): Promise<ImportResult>;
    /**
     * 读取文件内容
     */
    private static readFileContent;
    /**
     * 解析 iCal 内容
     */
    private static parseICalContent;
    /**
     * 解析 JSON 内容
     */
    private static parseJSONContent;
    /**
     * 解析 CSV 内容
     */
    private static parseCSVContent;
    /**
     * 解析 CSV 行
     */
    private static parseCSVLine;
    /**
     * 验证和过滤事件
     */
    private static validateAndFilterEvents;
    /**
     * 解析 iCal 日期时间
     */
    private static parseICalDateTime;
    /**
     * 反转义 iCal 文本
     */
    private static unescapeICalText;
    /**
     * 映射 iCal 优先级
     */
    private static mapICalPriority;
}

interface RecurrenceRule {
    type: 'daily' | 'weekly' | 'monthly' | 'yearly';
    interval: number;
    endDate?: string;
    count?: number;
    daysOfWeek?: number[];
    dayOfMonth?: number;
    weekOfMonth?: number;
}
interface RecurringEventInstance {
    startTime: string;
    endTime: string;
    title: string;
    description?: string;
    location?: string;
    color?: string;
    priority?: string;
    allDay: boolean;
    isRecurringInstance: boolean;
    recurrenceId?: string;
    instanceDate: string;
}
declare class RecurrenceService {
    /**
     * 根据重复规则生成事件实例
     */
    static generateRecurringInstances(baseEvent: {
        title: string;
        description?: string;
        startTime: string;
        endTime: string;
        location?: string;
        color?: string;
        priority?: string;
        allDay: boolean;
    }, rule: RecurrenceRule, startDate: Date, endDate: Date, eventId?: string): RecurringEventInstance[];
    /**
     * 判断是否应该在指定日期生成实例
     */
    private static shouldGenerateInstance;
    /**
     * 获取下一个重复事件的日期
     */
    private static getNextOccurrence;
    /**
     * 验证重复规则
     */
    static validateRecurrenceRule(rule: RecurrenceRule): string[];
    /**
     * 将表单数据转换为重复规则
     */
    static formDataToRecurrenceRule(formData: {
        recurrenceType?: 'daily' | 'weekly' | 'monthly' | 'yearly';
        recurrenceInterval?: number;
        recurrenceEndDate?: string;
        recurrenceCount?: number;
    }): RecurrenceRule | null;
    /**
     * 描述重复规则的文本
     */
    static describeRecurrenceRule(rule: RecurrenceRule): string;
}

interface ReminderConfig {
    minutes: number;
    type: 'browser' | 'email' | 'sms' | 'sound';
    enabled: boolean;
}
interface ScheduledReminder {
    id: string;
    eventId: number;
    eventTitle: string;
    reminderTime: Date;
    config: ReminderConfig;
    status: 'pending' | 'sent' | 'failed';
}
declare class ReminderService {
    private static reminders;
    private static notificationPermission;
    /**
     * 初始化提醒服务
     */
    static initialize(): Promise<void>;
    /**
     * 为事件创建提醒
     */
    static createReminder(event: CalendarEvent, reminderMinutes: number, reminderType?: 'browser' | 'email' | 'sms' | 'sound'): string;
    /**
     * 删除提醒
     */
    static deleteReminder(reminderId: string): boolean;
    /**
     * 删除事件的所有提醒
     */
    static deleteEventReminders(eventId: number): void;
    /**
     * 检查并触发到期的提醒
     */
    private static checkPendingReminders;
    /**
     * 触发提醒
     */
    private static triggerReminder;
    /**
     * 发送浏览器通知
     */
    private static sendBrowserNotification;
    /**
     * 发送邮件提醒
     */
    private static sendEmailReminder;
    /**
     * 发送短信提醒
     */
    private static sendSmsReminder;
    /**
     * 播放声音提醒
     */
    private static playSoundReminder;
    /**
     * 显示视觉提醒
     */
    private static showVisualAlert;
    /**
     * 获取时间描述文本
     */
    private static getTimeText;
    /**
     * 获取所有提醒
     */
    static getAllReminders(): ScheduledReminder[];
    /**
     * 获取事件的提醒
     */
    static getEventReminders(eventId: number): ScheduledReminder[];
    /**
     * 智能推荐提醒时间
     */
    static getSmartReminderSuggestions(event: CalendarEvent): number[];
    /**
     * 批量创建智能提醒
     */
    static createSmartReminders(event: CalendarEvent): string[];
}

/**
 * Calendar 模块 - 主入口文件
 *
 * 这是一个完整的日历应用模块，提供了从前端组件到后端API的完整解决方案。
 * 主要功能包括：
 * - 日历视图（月视图、周视图、日视图）
 * - 事件管理（创建、编辑、删除）
 * - 重复事件支持
 * - 提醒功能
 * - 用户配置管理
 * - 事件分享功能
 *
 * 架构特点：
 * - 前后端分离，支持服务端渲染
 * - 模块化设计，便于维护和扩展
 * - TypeScript严格类型检查
 * - TailwindCSS响应式设计
 *
 * @version 1.0.0
 * @author Profile-v1 Team
 */
/** 基础数据类型 */

/** 模块版本号 */
declare const CALENDAR_MODULE_VERSION = "1.0.0";
/** 模块名称标识 */
declare const CALENDAR_MODULE_NAME = "sa2kit/calendar";

export { type ApiResponse, type BaseEventData, CALENDAR_MODULE_NAME, CALENDAR_MODULE_VERSION, type CalendarActions, type CalendarCell, type CalendarConfig, type CalendarEvent, CalendarExportService, CalendarImportService, CalendarPage, type CalendarState, type CalendarViewProps, CalendarViewType, type CreateEventRequest, type DateRange, type DeleteEventRequest, type DragState, DraggableEvent, DraggableMonthView, DroppableCalendarCell, type EventCardProps, EventColor, type EventData, EventDetailPage, EventForm, type EventFormData, type EventFormProps$1 as EventFormProps, EventList, type EventListConfig, EventListDisplayMode, type EventListFilter, type EventListProps, type EventListSort, EventModal, type EventModalProps$1 as EventModalProps, EventPriority, type EventResponse, EventSearch, EventSortField, EventType, EventTypeService, type EventsResponse, type ExportOptions, type GeneratedEvent, type GetEventsRequest, type CalendarDbService as ICalendarDbService, type CalendarService as ICalendarService, type ImportOptions, type ImportResult, type MiniCalendarProps, type MultiDayEventData, type RecurrenceFormData, RecurrencePattern, type RecurrenceRule$1 as RecurrenceRule, type RecurrenceRule as RecurrenceRuleType, RecurrenceService, RecurrenceType, type RecurringEventData, type RecurringEventInstance, type Reminder, type ReminderConfig, type ReminderFormData, ReminderService, ReminderStatus, ReminderType, type ScheduledReminder, type SingleEventData, SortDirection, type TimeSlot, type UpdateEventRequest, type UseCalendarReturn, type UseEnhancedEventsReturn, type UseEventDragReturn, type UseEventsReturn$1 as UseEventsReturn, addDays, addMonths, addWeeks, addYears, cloneDate, formatDate, formatDateTime, formatTime, generateTimeSlots, getDayEnd, getDayStart, getDaysDifference, getMonthEnd, getMonthName, getMonthStart, getMonthViewDates, getRelativeTime, getWeekEnd, getWeekStart, getWeekViewDates, getWeekdayName, isSameDay, isSameMonth, isSameWeek, isToday, isValidDate, isWeekend, isWorkingHour, parseDate, toLocalISOString, useEnhancedEvents, useEventDrag, useEvents };
