Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.145/page_editor/core/hooks/useSessionState",["module","exports","require","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){const[r,s]=(0,n.useState)((()=>{const r=window.sessionStorage.getItem(e)||"";try{const e=JSON.parse(r);if(!(0,o.default)(e))return e}catch(e){}return t}));return(0,n.useEffect)((()=>{(0,o.default)(r)?window.sessionStorage.removeItem(e):window.sessionStorage.setItem(e,JSON.stringify(r))}),[e,r]),[r,s]};var n=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