import { Component, MouseEvent, ReactNode } from 'react';
import { ContentRect } from 'react-measure';
import { FormContextProps } from '../Form/types';
import { InPlaceEditProps } from '../InPlaceEdit';
import './Section.less';
export interface SectionProps {
    /**
     * Title of the section.
     * @since 0.0.54
     */
    title?: ReactNode;
    /**
     * Visual intent color to apply to component.
     * @since 0.0.54
     */
    intent?: 'danger' | 'warning' | 'success' | 'inactive';
    /**
     * Is section collapsible.
     * @since 0.0.54
     */
    collapsible?: boolean;
    /**
     * Is section collapsed now.
     * @since 0.0.54
     */
    collapsed?: boolean;
    /**
     * Event handler of title change with inline editing form.
     * @since 0.0.54
     */
    onTitleChange?: InPlaceEditProps['onChange'];
    /**
     * Event handler of closing section with X-sign at the right.
     * @since 0.0.54
     */
    onClose?: () => void;
    /**
     * A callback executed when the section collapsing.
     * @since 3.26.0
     */
    onToggle?: (collapsed: boolean) => void;
    /**
     * Array of custom section action button at the right.
     * @since 0.0.54
     */
    buttons?: ReactNode[];
    /**
     * Vertical or horizontal section view.
     * Section view will be automatically switched if this parameter is not specified explicitly.
     * @since 0.3.0
     */
    vertical: boolean;
    /**
     * Content of the `Section`.
     * @since 0.0.54
     */
    children: ReactNode;
    /**
     * @ignore
     */
    className?: string;
    /**
     * @ignore
     */
    baseClassName?: string;
    /**
     * @ignore
     */
    form?: FormContextProps;
}
interface DerivedState {
    prevCollapsed?: boolean;
    prevErrors?: Record<string, any>;
    collapsed?: boolean;
}
interface SectionState extends DerivedState {
    vertical: boolean;
}
export declare const SECTION_BASE_CLASS_NAME: string;
declare class Section extends Component<SectionProps, SectionState> {
    static defaultProps: {
        title: undefined;
        intent: undefined;
        collapsible: boolean;
        collapsed: boolean;
        onTitleChange: undefined;
        onClose: undefined;
        onToggle: undefined;
        buttons: undefined;
        vertical: undefined;
        children: undefined;
        className: undefined;
        baseClassName: string;
        form: undefined;
    };
    state: SectionState;
    static getDerivedStateFromProps(props: SectionProps, state: SectionState): DerivedState;
    handleResize: ({ bounds }: ContentRect) => void;
    handleCollapse: (e: MouseEvent<HTMLButtonElement>) => void;
    renderCollapseButton({ baseClassName, collapsible, }: {
        baseClassName: string;
        collapsible: boolean;
    }): false | JSX.Element;
    renderCloseButton({ baseClassName, onClose, buttons, }: {
        baseClassName: string;
        onClose: SectionProps['onClose'];
        buttons: SectionProps['buttons'];
    }): JSX.Element | undefined;
    renderTitle({ baseClassName, title, onTitleChange, }: {
        baseClassName: string;
        title: SectionProps['title'];
        onTitleChange: SectionProps['onTitleChange'];
    }): false | "" | 0 | JSX.Element | null | undefined;
    renderContent({ collapsible, children }: {
        collapsible: boolean;
        children: ReactNode;
    }): ReactNode;
    render(): JSX.Element;
}
/**
 * `Section` component is used for dividing of complex content into groups for better readability
 * and comprehension of the presented information.
 * @since 0.0.54
 */
declare const SectionWrapper: {
    (props: Omit<SectionProps, 'form'>): JSX.Element;
    displayName: string;
    defaultProps: {
        title: undefined;
        intent: undefined;
        collapsible: boolean;
        collapsed: boolean;
        onTitleChange: undefined;
        onClose: undefined;
        onToggle: undefined;
        buttons: undefined;
        vertical: undefined;
        children: undefined;
        className: undefined;
        baseClassName: string;
        form: undefined;
    };
    WrappedComponent: typeof Section;
};
export default SectionWrapper;
