import { SchedulingMyBookingRow } from '../types/scheduling.mjs'; interface UseMyBookingsOptions { /** Override the API base path. Default: auto-detect via resolveSchedulingBasePath(). */ apiBase?: string; /** * If true, the hook will not auto-load on mount — the consumer calls * `refresh()` explicitly. Useful when the account page is gated by an auth * status that's still resolving and the initial fetch shouldn't fire until * the user is known-signed-in. */ skipInitialLoad?: boolean; /** * Called once with the canceled row id whenever a `cancel(id)` succeeds. * Fires after the optimistic update has been committed. */ onCancelled?: (bookingId: string) => void; } interface UseMyBookingsResult { basePath: string; /** Bookings whose `starts_at` is in the future. Sorted soonest-first. */ upcoming: SchedulingMyBookingRow[]; /** Bookings whose `starts_at` is in the past. Sorted newest-first. */ past: SchedulingMyBookingRow[]; /** True while the initial / refresh fetch is in flight. */ loading: boolean; /** The id currently being canceled, or null. */ cancelling: string | null; /** Last error string. Cleared on the next successful op. */ error: string | null; refresh: () => Promise; /** * Cancel a booking via POST /bookings/manage. Optimistically removes the row * from `upcoming` and reverts on failure. */ cancel: (bookingId: string) => Promise; } declare function useMyBookings(opts?: UseMyBookingsOptions): UseMyBookingsResult; export { type UseMyBookingsOptions, type UseMyBookingsResult, useMyBookings };