"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExpansionPanel = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const constants_1 = require("./constants");
const Details_1 = require("./Details");
const ExpansionPanelContext_1 = require("./ExpansionPanelContext");
const Summary_1 = require("./Summary");
const styles_1 = require("./styles");
const useLogic_1 = require("./useLogic");
const ExpansionPanel = (props) => {
    const { ref, isOpen, isInitialOpenEnabled } = (0, useLogic_1.useLogic)(props);
    const { children, isDisabled = false } = props;
    return ((0, jsx_runtime_1.jsx)(ExpansionPanelContext_1.ExpansionPanelContextProvider, { isOpen: isOpen, isDisabled: isDisabled, children: (0, jsx_runtime_1.jsx)(styles_1.Wrapper, { ref: ref, open: isInitialOpenEnabled, className: constants_1.expansionPanelClassnames.root, children: children }) }));
};
exports.ExpansionPanel = ExpansionPanel;
exports.ExpansionPanel.Summary = Summary_1.Summary;
exports.ExpansionPanel.Details = Details_1.Details;
