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 a}from"../Catalogue/index.js";import{I as l}from"../Icon/index.js";var c=function(){var c=n(),x=t(),p=x.components,m=x.content,u=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(l,{children:"undo"})}),e.exports.jsx("a",{onClick:function(){return k&&h()},className:s("oak-redo",!k&&"disabled"),children:e.exports.jsx(l,{children:"redo"})})]}),o(m).call(m,(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(a,{ref:c,onAppend:function(e){var s;u(e.construct()),null===(s=c.current)||void 0===s||s.close()}})}),e.exports.jsx("div",{ref:j}),C&&e.exports.jsxs("pre",{children:[e.exports.jsx("p",{children:"Content:"}),r(m,null,2),e.exports.jsx("p",{children:"Components:"}),r(p,null,2)]})]})};export{c as B};
//# sourceMappingURL=index.js.map
