import React from "react";
import { Header } from "../../common/Header";
import { FEAGlobals } from "../../../../common/Globals";
const ContentSection = ({ addListener, removeListener, getValue, setValue, activeSection, sections, }) => {
    const Component = sections[activeSection];
    const hideWindow = () => {
        var _a;
        (_a = FEAGlobals.finsembleWindow) === null || _a === void 0 ? void 0 : _a.hide();
    };
    return (React.createElement("div", { className: "complex-menu-content-row" },
        React.createElement("div", { className: "complex-menu-header" },
            React.createElement("div", { style: { marginTop: "-25px", marginLeft: "-25px" }, className: "active-section-header" },
                React.createElement(Header, null, activeSection)),
            React.createElement("div", { role: "button", tabIndex: 0, "aria-label": "Close", className: "ff-close complex-menu-close", onClick: hideWindow, onKeyDown: (e) => {
                    if (e.key === "Enter" || e.key === " ") {
                        hideWindow();
                    }
                } })),
        React.createElement(Component, { addListener: addListener, removeListener: removeListener, setValue: setValue, getValue: getValue })));
};
export default ContentSection;
//# sourceMappingURL=ContentSection.js.map