import { jsx as _jsx } from "react/jsx-runtime";
import { expansionPanelClassnames } from './constants';
import { Details } from './Details';
import { ExpansionPanelContextProvider } from './ExpansionPanelContext';
import { Summary } from './Summary';
import { Wrapper } from './styles';
import { useLogic } from './useLogic';
export const ExpansionPanel = (props) => {
    const { ref, isOpen, isInitialOpenEnabled } = useLogic(props);
    const { children, isDisabled = false } = props;
    return (_jsx(ExpansionPanelContextProvider, { isOpen: isOpen, isDisabled: isDisabled, children: _jsx(Wrapper, { ref: ref, open: isInitialOpenEnabled, className: expansionPanelClassnames.root, children: children }) }));
};
ExpansionPanel.Summary = Summary;
ExpansionPanel.Details = Details;
