import{j as e,K as s,L as o,M as r}from"../../vendor.js";import{useRef as n}from"react";import{a as t,u as d}from"../../hooks.js";import{E as i}from"../Element/index.js";import{C as l}from"../Catalogue/index.js";import{I as a}from"../Icon/index.js";var c=function(){var c=n(),x=t(),p=x.components,u=x.content,m=x.addElement,j=x._setSettingsHolderRef,f=x.undo,h=x.redo,v=x.isUndoPossible,k=x.isRedoPossible,b=d(),C=b.debug,N=b.historyButtonsEnabled;return e.exports.jsxs("div",{className:"oak-builder",children:[!1!==N&&e.exports.jsxs("div",{className:"oak-undo-redo",children:[e.exports.jsx("a",{onClick:function(){return v&&f()},className:s("oak-undo",!v&&"disabled"),children:e.exports.jsx(a,{children:"undo"})}),e.exports.jsx("a",{onClick:function(){return k&&h()},className:s("oak-redo",!k&&"disabled"),children:e.exports.jsx(a,{children:"redo"})})]}),o(u).call(u,(function(s,o){return e.exports.jsx(i,{index:o,element:s},s.id||o)})),e.exports.jsx("div",{className:"oak-add-element",children:e.exports.jsx(l,{ref:c,onAppend:function(e){var s,o;m((null===(s=e.construct)||void 0===s?void 0:s.call(e))||{}),null===(o=c.current)||void 0===o||o.close()}})}),e.exports.jsx("div",{ref:j}),C&&e.exports.jsxs("pre",{children:[e.exports.jsx("p",{children:"Content:"}),r(u,null,2),e.exports.jsx("p",{children:"Components:"}),r(p,null,2)]})]})};export{c as B};
//# sourceMappingURL=index.js.map
