1import{j as e,as as u,a as x,a1 as h,u as f,r as n,C as p,at as j,B as b}from"./index-Dfl_tZFa.js";import{M as g}from"./ModuleGate-wnte8da8.js";import{C as N}from"./circle-check-MfPMsOLc.js";import{L as z}from"./loader-circle-x9hSsoJE.js";import{S as v}from"./sparkles--mIrhW7F.js";import"./use-platform-modules-BmVs-Era.js";import"./useQuery-KzlpSEsd.js";function C(){const{brand:s}=u.useSearch(),l=x(),{brands:a,setCurrentBrandId:i,refresh:c,loading:d}=h(),{refreshProfile:o}=f();n.useEffect(()=>{o().catch(()=>{}),c().catch(()=>{})},[o,c]),n.useEffect(()=>{s&&a.some(r=>r.id===s)&&i(s)},[s,a,i]);const t=n.useMemo(()=>a.find(r=>r.id===s)??null,[a,s]),m=()=>{l({to:"/scribizzle/setup",search:{brand:s??void 0,scribizzle:void 0}})};return e.jsx("div",{className:"mx-auto flex min-h-[60vh] max-w-xl items-center justify-center",children:e.jsx(p,{className:"w-full text-center",children:e.jsxs(j,{className:"space-y-6 p-10",children:[e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-emerald-500/10",children:e.jsx(N,{className:"h-9 w-9 text-emerald-500"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Scribizzle activated!"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t?e.jsxs(e.Fragment,{children:["Scribizzle is now active for"," ",e.jsx("span",{className:"font-semibold text-foreground",children:t.name}),". Let's set up the brand details so we can generate your calendar."]}):d?e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsx(z,{className:"h-4 w-4 animate-spin"})," Loading your brandâ¦"]}):"Your add-on is active. Let's set up the brand details so we can generate your calendar."})]}),e.jsxs(b,{size:"lg",className:"w-full",onClick:m,children:[e.jsx(v,{className:"mr-2 h-4 w-4"}),"Set up ",t?.name??"this brand"]})]})})})}const M=()=>e.jsx(g,{moduleKey:"scribizzle",children:e.jsx(C,{})});export{M as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.