import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useContext } from 'react';
import { getInertProps } from '../../utils/getInertProps';
import { expansionPanelClassnames } from '../constants';
import { ExpansionPanelContext } from '../ExpansionPanelContext';
import { StyledChevron, Title, Wrapper } from './styles';
export const Summary = ({ children }) => {
    const { isDisabled, isOpen } = useContext(ExpansionPanelContext);
    return (_jsxs(Wrapper, { "$isSelected": isOpen, "$isDisabled": isDisabled, ...getInertProps(isDisabled), className: expansionPanelClassnames.summary, children: [_jsx(Title, { children: children }), _jsx(StyledChevron, { isActive: isOpen })] }));
};
