1import{y as p,r as x,j as e,C as h,I as u,af as c,L as b}from"./e.DS2xrfS2.js";import{O as j,E as f,a as N}from"./c.CW2fQR0R.js";import{u as g}from"./c.CYnO0WOZ.js";import{r as v}from"./c.ChSxp4ha.js";const m="/dashboard",y="/onboarding/brand-dna",_={site_url:"Site lido",scan:"Leitura da marca",why:"Propósito",how:"Diferencial",what:"Oferta",voice:"Personalidade e voz",brand_identity:"Identidade visual",brand_documents:"Documentos",brand_rules:"Do's & Don'ts",audience_profile:"Público-alvo",audience_persona:"Persona",competitors:"Concorrentes",complaints:"Reclamações",inspirations:"Inspiration Lab",products:"Catálogo"},k={brand:"Logo, cores, tipografia, documentos e o que nunca pode acontecer.",audience:"Pra quem você fala, o que essa pessoa sente e o que ela ignora.",strategy:"Concorrentes, reclamações do setor e o estilo de vÃdeos que te inspiram.",products:"O que você vende, em ordem de importância."},w={not_started:"NÃO COMEÃADO",in_progress:"EM ANDAMENTO",done:"CONCLUÃDO"},C={not_started:"ob-chip-tonal-neutral",in_progress:"ob-chip-tonal-blue",done:"ob-chip-tonal-green"};function D({percent:s}){const o=Math.max(0,Math.min(100,Math.round(s))),t=42,n=2*Math.PI*t;return e.jsx("div",{className:"relative h-14 w-14 shrink-0",children:e.jsxs("svg",{viewBox:"0 0 100 100",className:"h-full w-full -rotate-90",children:[e.jsx("circle",{cx:"50",cy:"50",r:t,fill:"none",strokeWidth:"14",stroke:"#f3f4f6"}),e.jsx("circle",{cx:"50",cy:"50",r:t,fill:"none",strokeWidth:"14",strokeLinecap:"round",className:"stroke-primary transition-[stroke-dashoffset] duration-500",strokeDasharray:n,strokeDashoffset:n-n*o/100})]})})}function O(s){var a;const o=s.steps??[],t=o.find(r=>!r.done&&!r.skipped),n=(t==null?void 0:t.key)??((a=o[0])==null?void 0:a.key);return v(n??s.key,s.key)??s.key}function S({block:s}){const o=p(),t=s.status??"not_started",n=t==="in_progress",a=t==="not_started";return e.jsxs("article",{className:c("ob-block-card",n&&"ob-block-card-active",a&&"ob-block-card-idle"),children:[e.jsxs("div",{className:c("flex flex-col gap-4",a&&"opacity-75"),children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("span",{className:c("ob-block-icon",n&&"ob-block-icon-active"),children:e.jsx("span",{"aria-hidden":!0})}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("h3",{className:"ob-card-title",children:s.label}),e.jsx("span",{className:c("ob-badge-status",C[t]),children:w[t]})]}),e.jsxs("span",{className:"ob-label shrink-0",children:[s.done,"/",s.total]})]}),e.jsx("p",{className:"ob-body text-[#5b6472]",children:k[s.key]??""})]})]}),s.total>0&&e.jsx("div",{className:"ob-seg-track",children:Array.from({length:s.total}).map((r,l)=>e.jsx("span",{className:c("ob-seg",l<s.done&&"ob-seg-on")},l))})]}),e.jsxs("div",{className:"mt-auto flex flex-wrap items-center justify-between gap-3",children:[e.jsx("div",{className:c("flex flex-wrap items-center gap-2",a&&"opacity-75"),children:s.unlocks&&s.unlocks.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"inline-flex items-center gap-1 text-[13px] text-[#5b6472]",children:[e.jsx(b,{"aria-hidden":!0,className:"h-3.5 w-3.5"}),"destrava"]}),s.unlocks.map(r=>e.jsx("span",{className:"ob-chip",children:r},r))]})}),e.jsxs("button",{type:"button",className:c("ob-btn",n?"ob-btn-primary":"ob-btn-secondary"),onClick:()=>o(`/onboarding/b/${s.key}/${O(s)}`),children:[a?"Começar":t==="done"?"Revisar":"Continuar"," ",e.jsx("span",{"aria-hidden":!0,children:"â"})]})]})]})}function T(){const s=p(),{state:o,loading:t,error:n}=g(),a=o==null?void 0:o.progress,r=(a==null?void 0:a.blocks)??[],l=r.length>0&&r.every(i=>i.status==="done"),d=x.useMemo(()=>((a==null?void 0:a.completed_steps)??[]).map(i=>_[i]??i).filter(Boolean),[a==null?void 0:a.completed_steps]);return e.jsxs("div",{children:[e.jsx("div",{className:"ob-container",children:e.jsx(j,{children:e.jsx(f,{onClick:()=>s(m)})})}),e.jsxs("div",{className:"ob-container ob-content",children:[e.jsxs("header",{className:"space-y-8",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-8",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h1",{className:"ob-page-title max-w-[22ch]",children:"Estamos quase finalizando nosso mapeamento."}),e.jsxs("p",{className:"ob-subtitle max-w-[52ch]",children:["Daqui pra frente é ",e.jsx("strong",{className:"text-foreground",children:"você"})," quem escolhe a ordem. Cada bloco que você fecha destrava mais coisa dentro da Klike."]})]}),t&&!a?e.jsx("div",{className:"h-28 w-28 animate-pulse rounded-full bg-muted"}):a&&e.jsxs("div",{className:"ob-card flex items-center gap-4 p-5",children:[e.jsx(D,{percent:a.percent??0}),e.jsxs("div",{children:[e.jsxs("p",{className:"ob-page-title text-[32px]",children:[Math.round(a.percent??0),"%"]}),e.jsxs("p",{className:"ob-label",children:[a.steps_done??0," de ",a.steps_total??0," passos"]})]})]})]}),n&&e.jsx("p",{className:"ob-body text-destructive",children:n}),d.length>0&&e.jsxs("p",{className:"ob-card flex flex-wrap items-center gap-x-2 gap-y-1 border-[hsl(91_64%_66%)] bg-[hsl(91_64%_66%_/_0.12)] p-4 text-[15px] text-[#5b6472]",children:[e.jsx(h,{"aria-hidden":!0,
1className:"h-4 w-4 text-[#3f6b1f]"}),e.jsx("span",{className:"font-semibold text-foreground",children:"Feito:"}),d.join(" · ")]})]}),e.jsx("div",{className:"mt-10 grid gap-5 lg:grid-cols-2",children:r.map(i=>e.jsx(S,{block:i},i.key))}),l&&e.jsx("div",{className:"mt-8",children:e.jsxs("button",{type:"button",className:"ob-btn ob-btn-primary",onClick:()=>s(y),children:["Fechar meu Brand DNA ",e.jsx("span",{"aria-hidden":!0,children:"â"})]})})]}),e.jsxs(N,{children:[e.jsxs("p",{className:"ob-label mx-auto inline-flex items-start gap-2",children:[e.jsx(u,{"aria-hidden":!0,className:"mt-0.5 h-4 w-4 shrink-0"}),"Você já pode usar a Klike agora. Quanto mais completo, menos genérico ela fica."]}),e.jsxs("button",{type:"button",className:"ob-btn ob-btn-dark",onClick:()=>s(m),children:["Ir para o painel ",e.jsx("span",{"aria-hidden":!0,children:"â"})]})]})]})}export{T as default};
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.