import { ReactElement, ReactType } from 'react';
import PropTypes from 'prop-types';
/**
 * The stepper context as PropTypes to be consumed by React
 */
export declare const stepperContext: {
    pages: PropTypes.Requireable<any[]>;
    currentPage: PropTypes.Requireable<number>;
    canAdvance: PropTypes.Requireable<boolean>;
    canFinish: PropTypes.Requireable<boolean>;
    canReverse: PropTypes.Requireable<boolean>;
    setPageIndex: PropTypes.Requireable<(...args: any[]) => any>;
};
/**
 * The context that is avalible inside a stepper and is
 * consumed by the various UI components
 */
export declare type Context = {
    pages: Array<PageConfig>;
    currentPage: number;
    canAdvance: boolean;
    canFinish: boolean;
    canReverse: boolean;
    setPageIndex: (index: number) => void;
};
export declare type Awaitable<T> = Promise<T> | T;
/**
 * The allowed page statuses
 */
export declare type Status = 'done' | 'alert';
/**
 * A page in the stepper
 */
export declare type PageConfig = {
    title?: string;
    subTitle?: string;
    status?: Status;
    /**
     * Callback when the page is about to be set as active.
     *
     * If a Promise is returned, it will be awaited before the page is actived.
     * This is not called when the stepper is first rendered.
     */
    onEnter?: (previousIndex: number) => Awaitable<void>;
    /**
     * Callback when the page is about the be left.
     *
     * If a Promise is returned, it will be awaited before the next page is actived.
     * If false or a promise that resolves to false is returned the navigation is aborted.
     */
    onLeave?: (nextIndex: number) => Awaitable<void | boolean>;
    /**
     * Callback when the page is about the be left for a subsequent page.
     *
     * If a Promise is returned, it will be awaited before the next page is actived.
     * If false or a promise that resolves to false is returned the navigation is aborted.
     */
    onAdvance?: (nextIndex: number) => Awaitable<void | boolean>;
    /**
     * Callback when the page is about the be left for a preceding page.
     *
     * If a Promise is returned, it will be awaited before the next page is actived.
     * If false or a promise that resolves to false is returned the navigation is aborted.
     */
    onReverse?: (nextIndex: number) => Awaitable<void | boolean>;
    /**
     * Controls whenever the page is allow to be left for a subsequent page.
     */
    canAdvance?: () => boolean;
    /**
     * Controls whenever the page is allow to be left for a preceding page.
     */
    canReverse?: () => boolean;
    /**
     * A function to render when this page is active, takes precedence over
     * component if both is set.
     */
    render?: () => ReactElement<any>;
    /**
     * The component to render when this page is active. Either component or
     * render must be specified.
     */
    component?: ReactType;
};
