"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../Store/Store.js");require("../Store/utils.js");var n=require("../../Menu/Menu.js"),s=require("../templateMenuItems/index.js"),u=require("./MenuHeader/MenuHeader.js"),a=require("./TemplateMenu.scss.js");exports.TemplateMenu=function(){var i=t.storeApi.useCloseTemplateMenu,l=t.storeApi.useTemplateMenuData,o=t.storeApi.useTemplateById,p=i(),m=l(),d=o(null==m?void 0:m.templateId),c=s.useTemplateActions(d);return d&&c.length?e.jsx(e.Fragment,{children:e.jsxs(n.Menu,{open:!!d,anchorEl:(null==m?void 0:m.anchorEl)||null,onClose:p,placement:"right-start",className:a.root,children:[e.jsx(u.MenuHeader,{}),c.map((function(t,s){var u=t.id,a=t.hasDividerBefore,i=t.Component;return e.jsxs(r.Fragment,{children:[s>0&&a&&e.jsx(n.Menu.Divider,{}),e.jsx(i,{template:d})]},u)}))]})}):null};
//# sourceMappingURL=TemplateMenu.js.map
