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