export type Selector = {
    type: 'data';
    key: string;
    value?: string;
} | {
    type: 'css';
    value: string;
} | {
    type: 'aria';
    role?: string;
    label?: string;
} | {
    type: 'shadow-css';
    value: string;
} | {
    type: 'ref';
    el?: HTMLElement;
};
export type TooltipStep = {
    kind: 'tooltip';
    id: string;
    anchor: Selector;
    content: {
        title?: string;
        body: string;
    };
    placement?: 'top' | 'bottom' | 'left' | 'right' | 'auto';
    offsetPx?: number;
    blocking?: boolean;
    trigger?: 'immediate' | 'hover' | 'click';
    dismiss?: {
        onEsc?: boolean;
        closeButton?: boolean;
        timeoutMs?: number;
    };
    /** CTA buttons for tour navigation */
    ctaButtons?: Array<{
        label: string;
        actionId: string;
        primary?: boolean;
    }>;
    /** In sequential mode, maps actionIds to next step IDs. Use 'end' to finish tour. */
    onAction?: Record<string, string>;
    /** Route this step should appear on (for cross-page tours) */
    route?: string;
};
export type HighlightStep = {
    kind: 'highlight';
    id: string;
    anchor: Selector;
    copy?: string;
    ring?: {
        paddingPx?: number;
        radiusPx?: number;
    };
    scrim?: {
        opacity?: number;
    };
    ringColor?: string;
    blocking?: boolean;
    dismiss?: {
        onClickOutside?: boolean;
        onEsc?: boolean;
        timeoutMs?: number;
    };
};
export type ModalStep = {
    kind: 'modal';
    id: string;
    content: {
        title?: string;
        body: string;
    };
    size?: 'sm' | 'md' | 'lg';
    blocking?: boolean;
    scrim?: {
        opacity?: number;
    };
    dismiss?: {
        onEsc?: boolean;
        closeButton?: boolean;
        timeoutMs?: number;
    };
    ctaButtons?: Array<{
        label: string;
        actionId: string;
        primary?: boolean;
    }>;
    /** In sequential mode, maps actionIds to next step IDs. Use 'end' to finish tour. */
    onAction?: Record<string, string>;
    /** Route this step should appear on (for cross-page tours) */
    route?: string;
};
export type CanvasRecipe = {
    id: string;
    version: number;
    /** Display title for the tour (shown in canvas tile) */
    title?: string;
    /** Display description for the tour (shown in canvas tile) */
    description?: string;
    routes?: string[];
    /** 'parallel' shows all steps at once (default), 'sequential' runs as a tour */
    mode?: 'parallel' | 'sequential';
    /** For sequential mode, the step ID to start with (defaults to first step) */
    startStep?: string;
    /**
     * Whether to auto-start this tour on page load (default: true for backwards compatibility).
     * Set to false for tours that should only start via explicit user action (e.g., clicking "Start Tour").
     */
    autoStart?: boolean;
    steps: Array<TooltipStep | HighlightStep | ModalStep>;
};
export type OverlayContext = {
    overlayRoot: HTMLElement;
    resolve: (sel: Selector) => Promise<HTMLElement | null>;
    onEvent: (name: string, payload?: Record<string, unknown>) => void;
    canvasHost?: HTMLElement | null;
    /** Recipe ID for telemetry attribution */
    recipeId?: string;
    /** Telemetry client for persisting tour state to PostHog */
    telemetry?: {
        setPersonPropertiesOnce?: (props: Record<string, unknown>) => void;
    };
    /** Subscribe to navigation changes (from NavigationMonitor) */
    subscribeNavigation?: (callback: (url: string, method: string) => void) => () => void;
};
