/*! Built with http://stenciljs.com */
const{h:e}=window.webcomponents;class o{static saveLocalModel(e,o="model"){"undefined"!=typeof window&&window.localStorage?(window.localStorage.setItem(o,JSON.stringify(e)),window.localStorage.setItem(o+"-changed",String(Math.round(+new Date/1e3)))):console.error("localStorage not available: not running in a browser")}static restoreLocalModel(e="model"){if("undefined"!=typeof window&&window.localStorage){if(localStorage.getItem(e))return JSON.parse(localStorage.getItem(e))}else console.error("localStorage not available: not running in a browser")}static flushLocalModel(e="model"){"undefined"!=typeof window&&window.localStorage?(localStorage.getItem(e)&&localStorage.removeItem(e),localStorage.getItem(e+"-changed")&&localStorage.removeItem(e+"-changed")):console.error("localStorage not available: not running in a browser")}}export{o as a};