Liferay.Loader.define("@liferay/object-web@1.0.108/js/components/Layout/LayoutScreen/AddNewTabButton",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/modal","liferay!frontend-js-react-web$react","../objectLayoutContext","./ModalAddObjectLayoutTab"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(a("@frontend-taglib-clay$clayui/button")),r=f(a("@frontend-taglib-clay$clayui/icon")),o=a("@frontend-taglib-clay$clayui/modal"),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=n?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(a,r,o):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),u=a("../objectLayoutContext"),d=f(a("./ModalAddObjectLayoutTab"));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}var i=()=>{const[{isViewOnly:e}]=(0,u.useLayoutContext)(),[t,a]=(0,l.useState)(!1),{observer:c,onClose:f}=(0,o.useModal)({onClose:()=>a(!1)});return l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:"layout-tab__add-tab-btn"},l.default.createElement(n.default,{disabled:e,displayType:"secondary",onClick:()=>a(!0)},l.default.createElement(r.default,{symbol:"plus"}),l.default.createElement("span",{className:"ml-2"},Liferay.Language.get("add-tab")))),t&&l.default.createElement(d.default,{observer:c,onClose:f}))};t.default=i}}));
//# sourceMappingURL=AddNewTabButton.js.map