import { SchedulingCalendarSummary } from '../types/scheduling.js'; type GoogleCalendarConnectStatus = 'unknown' | 'disconnected' | 'connected' | 'connecting'; interface UseGoogleCalendarConnectOptions { /** Override the API base path. Default: auto-detect via resolveSchedulingBasePath(). */ apiBase?: string; /** * Override the path to the calendars list endpoint, relative to apiBase. * Default: '/admin/google/calendars'. * * Per Phase C-2 the per-site UI may instead read availableCalendars from * the project's `/_bffless/integrations` endpoint — consumers that want * that wiring should override this and the `oauthStartPath` below. */ calendarsPath?: string; /** * Override the path that initiates the OAuth handoff. Default: * '/admin/google/oauth/start'. The endpoint is expected to return either * a JSON `{ authUrl }` or a 302 redirect; the hook handles both. */ oauthStartPath?: string; /** Skip the initial status probe (e.g. SSR). */ skipInitialLoad?: boolean; } interface UseGoogleCalendarConnectResult { status: GoogleCalendarConnectStatus; connectedEmail: string | null; availableCalendars: SchedulingCalendarSummary[]; error: string | null; refresh: () => Promise; start: () => Promise; } declare function useGoogleCalendarConnect(opts?: UseGoogleCalendarConnectOptions): UseGoogleCalendarConnectResult; export { type GoogleCalendarConnectStatus, type UseGoogleCalendarConnectOptions, type UseGoogleCalendarConnectResult, useGoogleCalendarConnect };