import { type BreakWindow } from "@zigoschedule/scheduler-engine"; export declare const MSG_HORARIO_PASSADO = "This time has already passed."; export declare const MSG_INTERVALO_ALMOCO = "This time is reserved for the break."; export declare const MSG_HORARIO_OCUPADO = "This time is already booked."; export declare const MSG_FORA_FUNCIONAMENTO = "This time is outside business hours."; export type ColumnSelectionResult = { ok: true; startMinute: number; } | { ok: false; message: string; }; export type ColumnSelectionInput = { dayKey: string; professionalId: string | null; /** Minute the pointer landed on, already snapped to the grid. */ minute: number; /** Working window of this column. */ startMinute: number; endMinute: number; pause: BreakWindow | null; closedMessage: string | null; outOfHoursMessage: string; pastMessage?: string; lunchMessage?: string; occupiedMessage?: string; fallbackOutOfHoursMessage?: string; /** * True when the column has no professional yet, so per-resource checks are * postponed to the drawer. Week columns are shared by everyone. */ deferResourceValidation: boolean; isDayInPast: (dayKey: string) => boolean; isDayFinished: (dayKey: string) => boolean; isSlotInPast: (dayKey: string, minute: number) => boolean; isSlotTaken: (dayKey: string, professionalId: string | null, minute: number) => boolean; /** Nudges the start to the next bookable minute, or refuses. */ resolveSelectableStart: (dayKey: string, professionalId: string | null, minute: number) => number | null; }; /** * Decides whether a click may open a selection, and where it starts. * * These were guard clauses buried in a pointer handler. They are business * rules: "not in the past", "not during lunch", "not on top of somebody"; and * a rule that only runs inside a DOM event is a rule nobody can test. * * Every refusal carries the sentence the user should see. Refusing silently is * what makes a calendar feel broken when it is in fact doing its job. */ export declare function resolveColumnSelection(input: ColumnSelectionInput): ColumnSelectionResult;