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