Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/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,a.useState)(t?e.pageDesign:e.contentEditing),s=(0,l.useSelector)((e=>e.permissions)),f=(0,a.useRef)();return(0,a.useEffect)((()=>{s.UPDATE?f.current="UPDATE":s.UPDATE_LAYOUT_BASIC?f.current="UPDATE_LAYOUT_BASIC":f.current="UPDATE_LAYOUT_LIMITED"}),[]),a.default.createElement(o.default,{alignmentPosition:o.Align.BottomLeft,closeOnClick:!0,menuElementAttrs:{className:"page-editor__edit-mode-dropdown-menu",containerProps:{className:"cadmin"}},trigger:a.default.createElement(r.default,{className:"form-control-select page-editor__edit-mode-selector text-left",disabled:!t,displayType:"secondary",small:!0,type:"button"},a.default.createElement("span",null,u))},a.default.createElement(o.default.ItemList,null,a.default.createElement(o.default.Item,{onClick:()=>{d(e.pageDesign),n((0,i.default)(f.current,!0))}},e.pageDesign),a.default.createElement(o.default.Item,{onClick:()=>{d(e.contentEditing),n((0,i.default)(f.current,!1))}},e.contentEditing)))};var r=s(n("@frontend-taglib-clay$clayui/button")),o=d(n("@frontend-taglib-clay$clayui/drop-down")),a=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 o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=r?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}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