import * as React$1 from 'react'; import React__default, { Dispatch, ReactNode, ComponentType, ReactElement } from 'react'; import { PopoverStylesObj, Position, PositionProps } from '@reactour/popover'; export { Position } from '@reactour/popover'; import { MaskStylesObj } from '@reactour/mask'; import { RectResult } from '@reactour/utils'; type StylesKeys = 'badge' | 'controls' | 'navigation' | 'button' | 'arrow' | 'dot' | 'close' | 'svg'; type StylesObj = { [key in StylesKeys]?: StyleFn; }; type StyleFn = (props: { [key: string]: any; }, state?: { [key: string]: any; }) => React.CSSProperties; type BadgeProps$1 = { styles?: StylesObj; }; type CloseProps = { styles?: StylesObj; onClick?: () => void; disabled?: boolean; }; type ContentProps = { content: any; setCurrentStep: Dispatch>; setIsOpen?: Dispatch>; currentStep: number; transition?: boolean; isHighlightingObserved?: boolean; }; type BaseProps = { styles?: StylesObj; }; type NavigationProps = BaseProps & { setCurrentStep: Dispatch>; steps: StepType[]; currentStep: number; disableDots?: boolean; nextButton?: (props: BtnFnProps) => ReactNode | null; prevButton?: (props: BtnFnProps) => ReactNode | null; setIsOpen: Dispatch>; hideButtons?: boolean; hideDots?: boolean; disableAll?: boolean; rtl?: boolean; Arrow?: ComponentType; }; type ArrowProps = BaseProps & { inverted?: boolean; disabled?: boolean; }; interface PopoverComponents { Badge: ComponentType; Close: ComponentType; Content: ComponentType; Navigation: ComponentType; Arrow: ComponentType; } type PopoverComponentsType = Partial; declare const components: { Badge: React$1.FC>; Close: React$1.FC; Content: React$1.FC; Navigation: React$1.FC; Arrow: React$1.FC; }; type SharedProps = KeyboardHandler & { steps: StepType[]; styles?: StylesObj & PopoverStylesObj & MaskStylesObj; padding?: Padding; position?: Position; disableInteraction?: boolean | ((clickProps: Pick) => boolean); disableFocusLock?: boolean; disableDotsNavigation?: boolean; disableKeyboardNavigation?: boolean | KeyboardParts[]; className?: string; maskClassName?: string; highlightedMaskClassName?: string; maskId?: string; clipId?: string; nextButton?: (props: BtnFnProps) => ReactNode | null; prevButton?: (props: BtnFnProps) => ReactNode | null; afterOpen?: (target: Element | null) => void; beforeClose?: (target: Element | null) => void; onClickMask?: (clickProps: ClickProps) => void; onClickClose?: (clickProps: ClickProps) => void; onClickHighlighted?: (e: MouseEvent, clickProps: ClickProps) => void; badgeContent?: (badgeProps: BadgeProps) => any; showNavigation?: boolean; showPrevNextButtons?: boolean; showCloseButton?: boolean; showBadge?: boolean; showDots?: boolean; scrollSmooth?: boolean; inViewThreshold?: number | { x?: number; y?: number; }; accessibilityOptions?: A11yOptions; rtl?: boolean; components?: PopoverComponentsType; ContentComponent?: ComponentType; Wrapper?: ComponentType; }; type PopoverContentProps = { styles?: StylesObj & PopoverStylesObj & MaskStylesObj; badgeContent?: (badgeProps: BadgeProps) => any; components?: PopoverComponentsType; accessibilityOptions?: A11yOptions; disabledActions?: boolean; onClickClose?: (clickProps: ClickProps) => void; setCurrentStep: Dispatch>; currentStep: number; transition?: boolean; isHighlightingObserved?: boolean; setIsOpen: Dispatch>; steps: StepType[]; setSteps?: Dispatch>; showNavigation?: boolean; showPrevNextButtons?: boolean; showCloseButton?: boolean; showBadge?: boolean; showDots?: boolean; nextButton?: (props: BtnFnProps) => ReactNode | null; prevButton?: (props: BtnFnProps) => ReactNode | null; disableDotsNavigation?: boolean; rtl?: boolean; meta?: string; setMeta?: Dispatch>; }; type A11yOptions = { ariaLabelledBy?: string; closeButtonAriaLabel: string; showNavigationScreenReaders: boolean; }; type ComponentPadding = number | number[]; type Padding = number | { mask?: ComponentPadding; popover?: ComponentPadding; wrapper?: ComponentPadding; }; type KeyboardParts = 'esc' | 'left' | 'right'; type ClickProps = { setIsOpen: Dispatch>; setCurrentStep: Dispatch>; currentStep: number; steps?: StepType[]; setSteps?: Dispatch>; meta?: string; setMeta?: Dispatch>; }; type KeyboardHandler = { keyboardHandler?: (e: KeyboardEvent, clickProps?: ClickProps, status?: { isEscDisabled?: boolean; isRightDisabled?: boolean; isLeftDisabled?: boolean; }) => void; }; type TourProps = SharedProps & ClickProps & { isOpen: boolean; disabledActions: boolean; disableWhenSelectorFalsy?: boolean; setDisabledActions: Dispatch>; onTransition?: (postionsProps: PositionProps, prev: RectResult) => 'top' | 'right' | 'bottom' | 'left' | 'center' | [number, number]; }; type BadgeProps = { totalSteps: number; currentStep: number; transition?: boolean; }; type ProviderProps = SharedProps & { children: React.ReactNode; defaultOpen?: boolean; startAt?: number; setCurrentStep?: Dispatch>; currentStep?: number; meta?: string; setMeta?: Dispatch>; }; type StepType = { selector: string | Element; content: ReactElement | string | ((props: PopoverContentProps) => void); position?: Position; highlightedSelectors?: string[]; mutationObservables?: string[]; resizeObservables?: string[]; navDotAriaLabel?: string; stepInteraction?: boolean; action?: (elem: Element | null) => void; actionAfter?: (elem: Element | null) => void; disableActions?: boolean; padding?: Padding; bypassElem?: boolean; styles?: StylesObj & PopoverStylesObj & MaskStylesObj; }; type BtnFnProps = { Button: React.FC>; setCurrentStep: Dispatch>; stepsLength: number; currentStep: number; setIsOpen: Dispatch>; steps?: StepType[]; }; type NavButtonProps = { onClick?: () => void; kind?: 'next' | 'prev'; hideArrow?: boolean; }; declare const Tour: React__default.FC; declare const TourContext: React__default.Context; declare const TourProvider: React__default.FC; declare function useTour(): TourProps; declare function withTour

(WrappedComponent: React__default.ComponentType

): (props: P) => React__default.JSX.Element; export { type KeyboardParts, type PopoverContentProps, type ProviderProps, type StepType, type StylesObj, Tour, TourContext, type TourProps, TourProvider, components, Tour as default, useTour, withTour };