import{c as e}from"./p-5cd01495.js";const l={env:"local",url:"http://localhost:3333",firebase:{apiKey:"AIzaSyAz5C9TRxQ9bUkTwVaD6Yc-Iisw57UslPM",authDomain:"fireenjin-live.firebaseapp.com",databaseURL:"https://fireenjin-live.firebaseio.com",projectId:"fireenjin-live",storageBucket:"fireenjin-live.appspot.com",messagingSenderId:"756564610596",appId:"1:756564610596:web:4fdf5a6ddfd319a93392b1",measurementId:"G-Q0ZHGFCQFN"},dynamicLinkDomain:"fireenjin.page.link"};function o(e,o){const a=e?e&&e.indexOf(".")>=0?e.split(".").reduce(((e,l)=>e&&e[l]||null),l):e&&void 0!==l[e]?l[e]:null:l;return o&&(!a&&!1!==a&&0!==a||null==a)?o:a}const{state:a,onChange:i}=e({config:o(),version:(null===localStorage||void 0===localStorage?void 0:localStorage.getItem)&&localStorage.getItem("fireenjin:version")?localStorage.getItem("fireenjin:version"):"1.1.0",profile:(null===localStorage||void 0===localStorage?void 0:localStorage.getItem)&&localStorage.getItem("fireenjin:profile")?JSON.parse(localStorage.getItem("fireenjin:profile")):{},session:null,templates:(null===localStorage||void 0===localStorage?void 0:localStorage.getItem)&&localStorage.getItem("fireenjin:templates")?JSON.parse(localStorage.getItem("fireenjin:templates")):[],partials:(null===localStorage||void 0===localStorage?void 0:localStorage.getItem)&&localStorage.getItem("fireenjin:partials")?JSON.parse(localStorage.getItem("fireenjin:partials")):[],template:(null===localStorage||void 0===localStorage?void 0:localStorage.getItem)&&localStorage.getItem("fireenjin:template")?JSON.parse(localStorage.getItem("fireenjin:template")):{},isOnline:!1,editorSizes:(null===localStorage||void 0===localStorage?void 0:localStorage.getItem)&&localStorage.getItem("fireenjin:editorSizes")?JSON.parse(localStorage.getItem("fireenjin:editorSizes")):[50,50],isPreviewing:!(!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem)||!localStorage.getItem("fireenjin:isPreviewing"))&&JSON.parse(localStorage.getItem("fireenjin:isPreviewing"))});i("editorSizes",(e=>{localStorage.setItem("fireenjin:editorSizes",JSON.stringify(e))})),i("isPreviewing",(e=>{localStorage.setItem("fireenjin:isPreviewing",JSON.stringify(e))})),i("profile",(e=>{localStorage.setItem("fireenjin:profile",JSON.stringify(e))})),i("version",(e=>{localStorage.setItem("fireenjin:version",e)})),i("template",(e=>{localStorage.setItem("fireenjin:template",JSON.stringify(e))})),i("templates",(e=>{localStorage.setItem("fireenjin:templates",JSON.stringify(e))})),i("partials",(e=>{localStorage.setItem("fireenjin:partials",JSON.stringify(e))}));export{o as e,a as s}