Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.130/page_editor/app/contexts/EditableProcessorContext",["module","exports","require","liferay!frontend-js-react-web$react"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.EditableProcessorContextProvider=function({children:t}){const[r,o]=(0,n.useState)(e),a=(0,n.useRef)(null);return a.current=r,n.default.createElement(u.Provider,{value:o},n.default.createElement(i.Provider,{value:a},n.default.createElement(l.Provider,{value:r},t)))},t.useEditableProcessorClickPosition=function(){return(0,n.useContext)(l).editableClickPosition},t.useEditableProcessorUniqueId=function(){return(0,n.useContext)(l).editableUniqueId},t.useIsProcessorEnabled=function(){const e=(0,n.useContext)(i);return(0,n.useCallback)(((t=null)=>{var r,n;return t?(null===(r=e.current)||void 0===r?void 0:r.editableUniqueId)===t:!!(null===(n=e.current)||void 0===n?void 0:n.editableUniqueId)}),[e])},t.useSetEditableProcessorUniqueId=function(){const e=(0,n.useContext)(u);return(0,n.useCallback)(((t,r=null)=>{e({editableClickPosition:r,editableUniqueId:t})}),[e])};var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var i=n?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(r,u,i):r[u]=e[u]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}const e={editableClickPosition:null,editableUniqueId:null},u=n.default.createContext((()=>{})),i=n.default.createContext({current:null}),l=n.default.createContext(e)}}));
//# sourceMappingURL=EditableProcessorContext.js.map