Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.130/page_editor/app/components/EditModeSelector",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/drop-down","liferay!frontend-js-react-web$react","../actions/togglePermission","../contexts/StoreContext","../selectors/selectCanSwitchEditMode"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const t=(0,l.useSelector)(c.default),n=(0,l.useDispatch)(),[u,d]=(0,o.useState)(!1),[s,f]=(0,o.useState)(t?e.pageDesign:e.contentEditing),g=(0,l.useSelector)((e=>e.permissions)),p=(0,o.useRef)();return(0,o.useEffect)((()=>{g.UPDATE?p.current="UPDATE":g.UPDATE_LAYOUT_BASIC?p.current="UPDATE_LAYOUT_BASIC":p.current="UPDATE_LAYOUT_LIMITED"}),[]),o.default.createElement(a.default,{active:u,alignmentPosition:a.Align.BottomLeft,menuElementAttrs:{className:"page-editor__edit-mode-dropdown-menu",containerProps:{className:"cadmin"}},onActiveChange:d,trigger:o.default.createElement(r.default,{className:"form-control-select page-editor__edit-mode-selector text-left",disabled:!t,displayType:"secondary",small:!0,type:"button"},o.default.createElement("span",null,s))},o.default.createElement(a.default.ItemList,null,o.default.createElement(a.default.Item,{onClick:()=>{d(!1),f(e.pageDesign),n((0,i.default)(p.current,!0))}},e.pageDesign),o.default.createElement(a.default.Item,{onClick:()=>{d(!1),f(e.contentEditing),n((0,i.default)(p.current,!1))}},e.contentEditing)))};var r=s(n("@frontend-taglib-clay$clayui/button")),a=d(n("@frontend-taglib-clay$clayui/drop-down")),o=d(n("liferay!frontend-js-react-web$react")),i=s(n("../actions/togglePermission")),l=n("../contexts/StoreContext"),c=s(n("../selectors/selectCanSwitchEditMode"));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function d(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function s(e){return e&&e.__esModule?e:{default:e}}const e={contentEditing:Liferay.Language.get("content-editing"),pageDesign:Liferay.Language.get("page-design")}}}));
//# sourceMappingURL=EditModeSelector.js.map