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