"use strict";var d=Object.defineProperty;var s=(e,o)=>d(e,"name",{value:o,configurable:true});var t=require("electron");var n=require("./constants");const a=require("../../preload-safe-debug")("Ferdium:feature:todos:preload");a("Preloading Todos Webview");let c=s(({action:e})=>{switch(e){case"todos:initialize-as-service":{t.ipcRenderer.sendToHost("hello");break}default:}},"hostMessageListener");window["ferdium"]={onInitialize(e){c=e;t.ipcRenderer.sendToHost(n.IPC.TODOS_CLIENT_CHANNEL,{action:"todos:initialized"})},sendToHost(e){t.ipcRenderer.sendToHost(n.IPC.TODOS_CLIENT_CHANNEL,e)}};t.ipcRenderer.on(n.IPC.TODOS_HOST_CHANNEL,(e,o)=>{a("Received host message",e,o);c(o)});if(window.location.href==="https://app.franztodos.com/login/"){const e=document.createElement("p");e.textContent=`You are using Franz's official Todo Service.
This service will only work with accounts registered with Franz - no Ferdium accounts will work here!
If you do not have a Franz account you can change the Todo service by going into Ferdium's settings and changing the "Todo server".
You can choose any service as this Todo server, e.g. Todoist or Apple Notes.`;let o=0;const r=setInterval(()=>{const i=document.querySelector("p");if(i){clearInterval(r);i.parentElement?.insertBefore(e,i)}else{o+=1;if(o>1e3){clearInterval(r)}}},10)}
