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