import { CalendarEvent, CalendarEventInput, CalendarOptions, CalendarView } from './calendar.types';
/**
* Headless calendar controller. Renders month/week/day grids into a provided
* container, places events into their day, supports keyboard date navigation,
* view switching, prev/next/today navigation and pointer drag to move events.
* It reflects state via `data-*` attributes and CSS custom properties — it
* applies no visual styling.
*
* Markup:
* ```html
*
*
*
*
*
*
*
*
*
*
*
*
* ```
*/
export declare class Calendar {
private readonly root;
private readonly grid;
private readonly titleEl;
private readonly weekStartsOn;
private readonly locale;
private current;
private view;
private focused;
private selected;
private readonly events;
private drag;
private cleanups;
constructor(root: HTMLElement, options?: CalendarOptions);
private normalizeInto;
private init;
private bindControl;
private rangeStart;
private dayCount;
private days;
private eventsOn;
private inPeriod;
private render;
private renderEvent;
private renderTitle;
private formatTitle;
private renderViewButtons;
private renderWeekdayHeader;
private onKeydown;
private moveFocus;
private moveFocusTo;
private focusCell;
private onGridClick;
private onPointerDown;
private readonly onPointerMove;
private readonly onPointerUp;
/** Switch the view (month/week/day). */
setView(view: CalendarView): void;
/** Move to the previous/next period (sign of `direction`). */
navigate(direction: number): void;
/** Jump to today's period. */
goToToday(): void;
/** Programmatically navigate to a given date (keeps the current view). */
goToDate(date: Date | string): void;
/** Select a date, reflect it and emit `calendar:select`. */
selectDate(date: Date | string): void;
/** Add an event and re-render. Returns the normalized event. */
addEvent(input: CalendarEventInput): CalendarEvent;
/** Remove an event by id. Returns true if it existed. */
removeEvent(id: string): boolean;
/**
* Move an event to a new day (preserving its time-of-day and duration) and
* emit `calendar:eventmove`.
*/
moveEvent(id: string, toDay: Date | string): boolean;
/** All events, sorted by start. */
getEvents(): CalendarEvent[];
get currentView(): CalendarView;
get currentDate(): Date;
get selectedDate(): Date | null;
private emitNavigate;
/** Subscribe to a DOM event on the root element. Returns an unsubscribe fn. */
on(event: string, handler: (event: E) => void): () => void;
destroy(): void;
}