import { type ReactNode } from 'react'; import type { TimeTrackerData } from './types'; interface TimeTrackerContextValue extends TimeTrackerData { isOpen: boolean; open: () => void; close: () => void; toggle: () => void; } export interface TimeTrackerProviderProps extends TimeTrackerData { children: ReactNode; defaultOpen?: boolean; /** * Whether the tracker is available to this host at all (feature flag, session, * entitlement). `false` provides NO context — `useOptionalTimeTracker()` reads * `null` and every surface hides itself, exactly as if this provider were absent. * * It exists so a host never has to mount this CONDITIONALLY. A host that writes * `enabled ? {children} : <>{children}` * changes the element TYPE at that position the moment its flag answers, and React * tears down and remounts everything below — the whole app shell, in the case this * was added for. Mount it always and pass the answer here instead. */ enabled?: boolean; } export declare function TimeTrackerProvider({ children, defaultOpen, enabled, ...data }: TimeTrackerProviderProps): import("react").JSX.Element; export declare function useTimeTracker(): TimeTrackerContextValue; export declare function useOptionalTimeTracker(): TimeTrackerContextValue | null; export {}; //# sourceMappingURL=time-tracker-context.d.ts.map