Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.174/page_editor/common/hooks/useSessionState",["module","exports","require","@liferay/layout-js-components-web","frontend-js-web","liferay!frontend-js-react-web$react"],(function(e,t,n){window;Object.defineProperty(t,"__esModule",{value:!0}),t.useSessionState=function useSessionState(e,t,n=s.COOKIE_TYPES.PERSONALIZATION){const[a,i]=(0,r.useState)((()=>{const r=s.sessionStorage.getItem(e,n)||"";try{const e=JSON.parse(r);if(!(0,o.isNullOrUndefined)(e))return e}catch(e){}return t}));return(0,r.useEffect)((()=>{(0,o.isNullOrUndefined)(a)?s.sessionStorage.removeItem(e):s.sessionStorage.setItem(e,JSON.stringify(a),n)}),[e,a,n]),[a,i]};var o=n("@liferay/layout-js-components-web"),s=n("frontend-js-web"),r=n("liferay!frontend-js-react-web$react")}));
//# sourceMappingURL=useSessionState.js.map