import * as React from 'react'; import { ResponsiveComponentProps } from './withResponsive'; export interface GetModeType { (width?: number): TModes; } export interface ModeChangedEvent { mode: TModes; } export interface ModeProviderProps extends ResponsiveComponentProps { mode?: TModes; onModeChange?(e: ModeChangedEvent): void; } export interface ModeProviderState { controlled: boolean; mode: TModes; } /** * Provides `mode` prop (if it's not passed manually) to the component depending on * the container width. When mode switches, HOC calls `onModeChange` prop if it is * defined. * @param getMode The function to determine the mode from the given width. * @returns A constructor function to wrap a component with the `mode` prop determined * by the getMode function. */ export declare function withResponsiveMode(getMode: GetModeType): >(Component: React.ComponentType) => React.ComponentClass & { inner: Readonly<{ Component: React.ComponentType; }>; };