/**
 * @file Collapse
 * @description
 * @author fex
 */
/// <reference types="hoist-non-react-statics" />
import React from 'react';
import { ClassNamesFn, ThemeProps } from 'amis-core';
import { TranslateFn } from 'amis-core';
export interface CollapseProps extends ThemeProps {
    id?: string;
    key?: string;
    collapseId?: string;
    propKey?: string;
    mountOnEnter?: boolean;
    unmountOnExit?: boolean;
    className?: string;
    style?: any;
    headerPosition?: 'top' | 'bottom';
    header?: React.ReactNode;
    body: any;
    bodyClassName?: string;
    disabled?: boolean;
    collapsable?: boolean;
    collapsed?: boolean;
    showArrow?: boolean;
    expandIcon?: React.ReactElement | null;
    headingClassName?: string;
    collapseHeader?: React.ReactElement | null;
    size?: 'xs' | 'sm' | 'md' | 'lg' | 'base';
    onCollapse?: (collapsed: boolean) => void;
    wrapperComponent?: any;
    headingComponent?: any;
    translate?: TranslateFn;
    propsUpdate?: boolean;
    partial?: boolean;
    children?: React.ReactNode | Array<React.ReactNode>;
    divideLine?: boolean;
    /** 当Collapse作为Form组件的子元素时，开启该属性后组件样式设置为FieldSet组件的样式，默认开启 */
    enableFieldSetStyle?: boolean;
}
export interface CollapseState {
    collapsed: boolean;
}
export declare class Collapse extends React.Component<CollapseProps, CollapseState> {
    static defaultProps: Partial<CollapseProps>;
    state: CollapseState;
    constructor(props: CollapseProps);
    static getDerivedStateFromProps(nextProps: CollapseProps, preState: CollapseState): {
        collapsed: boolean;
    } | null;
    toggleCollapsed(e: React.MouseEvent<HTMLElement>): void;
    /** 变更组件的折叠状态 */
    changeCollapsedState(targetState: boolean): void;
    contentDom: any;
    contentRef: (ref: any) => any;
    handleEnter(elem: HTMLElement): void;
    handleEntering(elem: HTMLElement): void;
    handleEntered(elem: HTMLElement): void;
    handleExit(elem: HTMLElement): void;
    handleExiting(elem: HTMLElement): void;
    render(): React.JSX.Element;
}
declare const _default: {
    new (props: Pick<Omit<CollapseProps, keyof ThemeProps>, never> & {
        id?: string | undefined;
        key?: string | undefined;
        children?: React.ReactNode | React.ReactNode[];
        body?: any;
        header?: React.ReactNode;
        translate?: TranslateFn<any> | undefined;
        partial?: boolean | undefined;
        collapsed?: boolean | undefined;
        disabled?: boolean | undefined;
        bodyClassName?: string | undefined;
        size?: "base" | "xs" | "sm" | "md" | "lg" | undefined;
        wrapperComponent?: any;
        showArrow?: boolean | undefined;
        collapsable?: boolean | undefined;
        mountOnEnter?: boolean | undefined;
        unmountOnExit?: boolean | undefined;
        expandIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
        enableFieldSetStyle?: boolean | undefined;
        headerPosition?: "top" | "bottom" | undefined;
        headingClassName?: string | undefined;
        collapseHeader?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
        divideLine?: boolean | undefined;
        headingComponent?: any;
        onCollapse?: ((collapsed: boolean) => void) | undefined;
        propsUpdate?: boolean | undefined;
        collapseId?: string | undefined;
        propKey?: string | undefined;
    } & {
        className?: string | undefined;
        classPrefix?: string | undefined;
        style?: any;
        mobileUI?: boolean | undefined;
        classnames?: ClassNamesFn | undefined;
        theme?: string | undefined;
    } & import("packages/amis-core/lib/theme").ThemeOuterProps): {
        ref: any;
        childRef(ref: any): void;
        getWrappedInstance(): any;
        render(): React.JSX.Element;
        context: unknown;
        setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<CollapseProps, keyof ThemeProps>, never> & {
            id?: string | undefined;
            key?: string | undefined;
            children?: React.ReactNode | React.ReactNode[];
            body?: any;
            header?: React.ReactNode;
            translate?: TranslateFn<any> | undefined;
            partial?: boolean | undefined;
            collapsed?: boolean | undefined;
            disabled?: boolean | undefined;
            bodyClassName?: string | undefined;
            size?: "base" | "xs" | "sm" | "md" | "lg" | undefined;
            wrapperComponent?: any;
            showArrow?: boolean | undefined;
            collapsable?: boolean | undefined;
            mountOnEnter?: boolean | undefined;
            unmountOnExit?: boolean | undefined;
            expandIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            enableFieldSetStyle?: boolean | undefined;
            headerPosition?: "top" | "bottom" | undefined;
            headingClassName?: string | undefined;
            collapseHeader?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            divideLine?: boolean | undefined;
            headingComponent?: any;
            onCollapse?: ((collapsed: boolean) => void) | undefined;
            propsUpdate?: boolean | undefined;
            collapseId?: string | undefined;
            propKey?: string | undefined;
        } & {
            className?: string | undefined;
            classPrefix?: string | undefined;
            style?: any;
            mobileUI?: boolean | undefined;
            classnames?: ClassNamesFn | undefined;
            theme?: string | undefined;
        } & import("packages/amis-core/lib/theme").ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
        forceUpdate(callback?: (() => void) | undefined): void;
        readonly props: Readonly<Pick<Omit<CollapseProps, keyof ThemeProps>, never> & {
            id?: string | undefined;
            key?: string | undefined;
            children?: React.ReactNode | React.ReactNode[];
            body?: any;
            header?: React.ReactNode;
            translate?: TranslateFn<any> | undefined;
            partial?: boolean | undefined;
            collapsed?: boolean | undefined;
            disabled?: boolean | undefined;
            bodyClassName?: string | undefined;
            size?: "base" | "xs" | "sm" | "md" | "lg" | undefined;
            wrapperComponent?: any;
            showArrow?: boolean | undefined;
            collapsable?: boolean | undefined;
            mountOnEnter?: boolean | undefined;
            unmountOnExit?: boolean | undefined;
            expandIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            enableFieldSetStyle?: boolean | undefined;
            headerPosition?: "top" | "bottom" | undefined;
            headingClassName?: string | undefined;
            collapseHeader?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            divideLine?: boolean | undefined;
            headingComponent?: any;
            onCollapse?: ((collapsed: boolean) => void) | undefined;
            propsUpdate?: boolean | undefined;
            collapseId?: string | undefined;
            propKey?: string | undefined;
        } & {
            className?: string | undefined;
            classPrefix?: string | undefined;
            style?: any;
            mobileUI?: boolean | undefined;
            classnames?: ClassNamesFn | undefined;
            theme?: string | undefined;
        } & import("packages/amis-core/lib/theme").ThemeOuterProps>;
        state: Readonly<{}>;
        refs: {
            [key: string]: React.ReactInstance;
        };
        componentDidMount?(): void;
        shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<CollapseProps, keyof ThemeProps>, never> & {
            id?: string | undefined;
            key?: string | undefined;
            children?: React.ReactNode | React.ReactNode[];
            body?: any;
            header?: React.ReactNode;
            translate?: TranslateFn<any> | undefined;
            partial?: boolean | undefined;
            collapsed?: boolean | undefined;
            disabled?: boolean | undefined;
            bodyClassName?: string | undefined;
            size?: "base" | "xs" | "sm" | "md" | "lg" | undefined;
            wrapperComponent?: any;
            showArrow?: boolean | undefined;
            collapsable?: boolean | undefined;
            mountOnEnter?: boolean | undefined;
            unmountOnExit?: boolean | undefined;
            expandIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            enableFieldSetStyle?: boolean | undefined;
            headerPosition?: "top" | "bottom" | undefined;
            headingClassName?: string | undefined;
            collapseHeader?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            divideLine?: boolean | undefined;
            headingComponent?: any;
            onCollapse?: ((collapsed: boolean) => void) | undefined;
            propsUpdate?: boolean | undefined;
            collapseId?: string | undefined;
            propKey?: string | undefined;
        } & {
            className?: string | undefined;
            classPrefix?: string | undefined;
            style?: any;
            mobileUI?: boolean | undefined;
            classnames?: ClassNamesFn | undefined;
            theme?: string | undefined;
        } & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
        componentWillUnmount?(): void;
        componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
        getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<CollapseProps, keyof ThemeProps>, never> & {
            id?: string | undefined;
            key?: string | undefined;
            children?: React.ReactNode | React.ReactNode[];
            body?: any;
            header?: React.ReactNode;
            translate?: TranslateFn<any> | undefined;
            partial?: boolean | undefined;
            collapsed?: boolean | undefined;
            disabled?: boolean | undefined;
            bodyClassName?: string | undefined;
            size?: "base" | "xs" | "sm" | "md" | "lg" | undefined;
            wrapperComponent?: any;
            showArrow?: boolean | undefined;
            collapsable?: boolean | undefined;
            mountOnEnter?: boolean | undefined;
            unmountOnExit?: boolean | undefined;
            expandIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            enableFieldSetStyle?: boolean | undefined;
            headerPosition?: "top" | "bottom" | undefined;
            headingClassName?: string | undefined;
            collapseHeader?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            divideLine?: boolean | undefined;
            headingComponent?: any;
            onCollapse?: ((collapsed: boolean) => void) | undefined;
            propsUpdate?: boolean | undefined;
            collapseId?: string | undefined;
            propKey?: string | undefined;
        } & {
            className?: string | undefined;
            classPrefix?: string | undefined;
            style?: any;
            mobileUI?: boolean | undefined;
            classnames?: ClassNamesFn | undefined;
            theme?: string | undefined;
        } & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>): any;
        componentDidUpdate?(prevProps: Readonly<Pick<Omit<CollapseProps, keyof ThemeProps>, never> & {
            id?: string | undefined;
            key?: string | undefined;
            children?: React.ReactNode | React.ReactNode[];
            body?: any;
            header?: React.ReactNode;
            translate?: TranslateFn<any> | undefined;
            partial?: boolean | undefined;
            collapsed?: boolean | undefined;
            disabled?: boolean | undefined;
            bodyClassName?: string | undefined;
            size?: "base" | "xs" | "sm" | "md" | "lg" | undefined;
            wrapperComponent?: any;
            showArrow?: boolean | undefined;
            collapsable?: boolean | undefined;
            mountOnEnter?: boolean | undefined;
            unmountOnExit?: boolean | undefined;
            expandIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            enableFieldSetStyle?: boolean | undefined;
            headerPosition?: "top" | "bottom" | undefined;
            headingClassName?: string | undefined;
            collapseHeader?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            divideLine?: boolean | undefined;
            headingComponent?: any;
            onCollapse?: ((collapsed: boolean) => void) | undefined;
            propsUpdate?: boolean | undefined;
            collapseId?: string | undefined;
            propKey?: string | undefined;
        } & {
            className?: string | undefined;
            classPrefix?: string | undefined;
            style?: any;
            mobileUI?: boolean | undefined;
            classnames?: ClassNamesFn | undefined;
            theme?: string | undefined;
        } & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void;
        componentWillMount?(): void;
        UNSAFE_componentWillMount?(): void;
        componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<CollapseProps, keyof ThemeProps>, never> & {
            id?: string | undefined;
            key?: string | undefined;
            children?: React.ReactNode | React.ReactNode[];
            body?: any;
            header?: React.ReactNode;
            translate?: TranslateFn<any> | undefined;
            partial?: boolean | undefined;
            collapsed?: boolean | undefined;
            disabled?: boolean | undefined;
            bodyClassName?: string | undefined;
            size?: "base" | "xs" | "sm" | "md" | "lg" | undefined;
            wrapperComponent?: any;
            showArrow?: boolean | undefined;
            collapsable?: boolean | undefined;
            mountOnEnter?: boolean | undefined;
            unmountOnExit?: boolean | undefined;
            expandIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            enableFieldSetStyle?: boolean | undefined;
            headerPosition?: "top" | "bottom" | undefined;
            headingClassName?: string | undefined;
            collapseHeader?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            divideLine?: boolean | undefined;
            headingComponent?: any;
            onCollapse?: ((collapsed: boolean) => void) | undefined;
            propsUpdate?: boolean | undefined;
            collapseId?: string | undefined;
            propKey?: string | undefined;
        } & {
            className?: string | undefined;
            classPrefix?: string | undefined;
            style?: any;
            mobileUI?: boolean | undefined;
            classnames?: ClassNamesFn | undefined;
            theme?: string | undefined;
        } & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
        UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<CollapseProps, keyof ThemeProps>, never> & {
            id?: string | undefined;
            key?: string | undefined;
            children?: React.ReactNode | React.ReactNode[];
            body?: any;
            header?: React.ReactNode;
            translate?: TranslateFn<any> | undefined;
            partial?: boolean | undefined;
            collapsed?: boolean | undefined;
            disabled?: boolean | undefined;
            bodyClassName?: string | undefined;
            size?: "base" | "xs" | "sm" | "md" | "lg" | undefined;
            wrapperComponent?: any;
            showArrow?: boolean | undefined;
            collapsable?: boolean | undefined;
            mountOnEnter?: boolean | undefined;
            unmountOnExit?: boolean | undefined;
            expandIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            enableFieldSetStyle?: boolean | undefined;
            headerPosition?: "top" | "bottom" | undefined;
            headingClassName?: string | undefined;
            collapseHeader?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            divideLine?: boolean | undefined;
            headingComponent?: any;
            onCollapse?: ((collapsed: boolean) => void) | undefined;
            propsUpdate?: boolean | undefined;
            collapseId?: string | undefined;
            propKey?: string | undefined;
        } & {
            className?: string | undefined;
            classPrefix?: string | undefined;
            style?: any;
            mobileUI?: boolean | undefined;
            classnames?: ClassNamesFn | undefined;
            theme?: string | undefined;
        } & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
        componentWillUpdate?(nextProps: Readonly<Pick<Omit<CollapseProps, keyof ThemeProps>, never> & {
            id?: string | undefined;
            key?: string | undefined;
            children?: React.ReactNode | React.ReactNode[];
            body?: any;
            header?: React.ReactNode;
            translate?: TranslateFn<any> | undefined;
            partial?: boolean | undefined;
            collapsed?: boolean | undefined;
            disabled?: boolean | undefined;
            bodyClassName?: string | undefined;
            size?: "base" | "xs" | "sm" | "md" | "lg" | undefined;
            wrapperComponent?: any;
            showArrow?: boolean | undefined;
            collapsable?: boolean | undefined;
            mountOnEnter?: boolean | undefined;
            unmountOnExit?: boolean | undefined;
            expandIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            enableFieldSetStyle?: boolean | undefined;
            headerPosition?: "top" | "bottom" | undefined;
            headingClassName?: string | undefined;
            collapseHeader?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            divideLine?: boolean | undefined;
            headingComponent?: any;
            onCollapse?: ((collapsed: boolean) => void) | undefined;
            propsUpdate?: boolean | undefined;
            collapseId?: string | undefined;
            propKey?: string | undefined;
        } & {
            className?: string | undefined;
            classPrefix?: string | undefined;
            style?: any;
            mobileUI?: boolean | undefined;
            classnames?: ClassNamesFn | undefined;
            theme?: string | undefined;
        } & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
        UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<CollapseProps, keyof ThemeProps>, never> & {
            id?: string | undefined;
            key?: string | undefined;
            children?: React.ReactNode | React.ReactNode[];
            body?: any;
            header?: React.ReactNode;
            translate?: TranslateFn<any> | undefined;
            partial?: boolean | undefined;
            collapsed?: boolean | undefined;
            disabled?: boolean | undefined;
            bodyClassName?: string | undefined;
            size?: "base" | "xs" | "sm" | "md" | "lg" | undefined;
            wrapperComponent?: any;
            showArrow?: boolean | undefined;
            collapsable?: boolean | undefined;
            mountOnEnter?: boolean | undefined;
            unmountOnExit?: boolean | undefined;
            expandIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            enableFieldSetStyle?: boolean | undefined;
            headerPosition?: "top" | "bottom" | undefined;
            headingClassName?: string | undefined;
            collapseHeader?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined;
            divideLine?: boolean | undefined;
            headingComponent?: any;
            onCollapse?: ((collapsed: boolean) => void) | undefined;
            propsUpdate?: boolean | undefined;
            collapseId?: string | undefined;
            propKey?: string | undefined;
        } & {
            className?: string | undefined;
            classPrefix?: string | undefined;
            style?: any;
            mobileUI?: boolean | undefined;
            classnames?: ClassNamesFn | undefined;
            theme?: string | undefined;
        } & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
    };
    displayName: string;
    contextType: React.Context<string>;
    ComposedComponent: React.ComponentType<typeof Collapse>;
} & import("hoist-non-react-statics").NonReactStatics<typeof Collapse, {}> & {
    ComposedComponent: typeof Collapse;
};
export default _default;
