"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Summary = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const getInertProps_1 = require("../../utils/getInertProps");
const constants_1 = require("../constants");
const ExpansionPanelContext_1 = require("../ExpansionPanelContext");
const styles_1 = require("./styles");
const Summary = ({ children }) => {
    const { isDisabled, isOpen } = (0, react_1.useContext)(ExpansionPanelContext_1.ExpansionPanelContext);
    return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { "$isSelected": isOpen, "$isDisabled": isDisabled, ...(0, getInertProps_1.getInertProps)(isDisabled), className: constants_1.expansionPanelClassnames.summary, children: [(0, jsx_runtime_1.jsx)(styles_1.Title, { children: children }), (0, jsx_runtime_1.jsx)(styles_1.StyledChevron, { isActive: isOpen })] }));
};
exports.Summary = Summary;
