export interface CalendarEvent {
  id: string;
  userId: string;
  caldavUUID?: string;
  etag?: string;
  title: string;
  description?: string;
  startTime: Date;
  endTime: Date;
  note?: string;
  recurrenceRule?: string;
  exceptionDates?: string[]; // ISO date strings (YYYY-MM-DD) for excluded occurrences
  createdAt?: Date;
  updatedAt?: Date;
  caldavSyncStatus?: CaldavSyncStatus;
}

export type RecurringDeleteMode = "single" | "future" | "all";
export type CaldavSyncStatus = "synced" | "error";

export interface DeleteRecurringEventDTO {
  mode: RecurringDeleteMode;
  occurrenceDate?: string; // ISO date string of the occurrence to delete
}

export interface CreateEventDTO {
  caldavUUID?: string;
  etag?: string;
  title: string;
  description?: string;
  startTime: Date;
  endTime: Date;
  note?: string;
  recurrenceRule?: string;
  exceptionDates?: string[]; // For display in proposals
  caldavSyncStatus?: CaldavSyncStatus;
}

export interface UpdateEventDTO {
  caldavUUID?: string;
  etag?: string;
  title?: string;
  description?: string;
  startTime?: Date;
  endTime?: Date;
  note?: string;
  recurrenceRule?: string;
  exceptionDates?: string[];
  caldavSyncStatus?: CaldavSyncStatus;
}

export interface ExpandedEvent extends CalendarEvent {
  occurrenceStart: Date;
  occurrenceEnd: Date;
}
