(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[748],{7084:function(n,t,e){Promise.resolve().then(e.bind(e,8450))},8450:function(n,t,e){"use strict";e.r(t),e.d(t,{default:function(){return o}});var s=e(1514),i=e(7993),r=e(8378);function o(){let[n,t]=(0,i.useState)([]);return(0,i.useEffect)(()=>{(async()=>{try{t((await (0,r.R1)("/api/admin/funnels")).funnels)}catch(n){}})()},[]),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold",children:"Funnels"}),(0,s.jsxs)("p",{className:"text-sm text-zinc-500",children:["Funnel definitions are stored in the database. Editor UI ships in v1.1 — for now, create funnels by inserting rows in ",(0,s.jsx)("code",{children:"funnels"})," + ",(0,s.jsx)("code",{children:"funnel_steps"}),"."]}),(0,s.jsxs)("div",{className:"text-sm",children:["Existing: ",n.length]})]})}},8378:function(n,t,e){"use strict";async function s(n){let t=await fetch(n,{credentials:"include",cache:"no-store"});if(401===t.status)throw window.location.href="/login",Error("unauthorized");if(!t.ok)throw Error("api ".concat(n," failed: ").concat(t.status));return t.json()}async function i(n,t){let e=await fetch(n,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(401===e.status)throw window.location.href="/login",Error("unauthorized");if(!e.ok)throw Error("api ".concat(n," failed: ").concat(e.status));return e.json()}e.d(t,{R1:function(){return s},sg:function(){return i}})}},function(n){n.O(0,[869,753,560],function(){return n(n.s=7084)}),_N_E=n.O()}]);