1import{u as b,r as c,j as t,a as A}from"./index-L9AYrVUw.js";import{I as S}from"./InstallWizardModal-CNE1lhkY.js";import{S as T}from"./SectionLabel-CESXB5lC.js";import{a6 as L,n as M}from"./PlanAccessModal-P_W2GThH.js";import{c as h,a as R}from"./coworkers-CXtW-JQU.js";import{g as D}from"./agentSummaries-CQG-ipAU.js";import{g as F}from"./agentHoverText-U3X5yOGm.js";import{C as P}from"./CoworkerAvatar-LLNKhRHM.js";import"./wizardConfigs-QWK-Utl1.js";import"./FloatingTopMenu-CIhwk2RR.js";import"./locale-Cctu0V3Y.js";import"./productFunnel-DiJFcMU2.js";import"./SnewLogo-Cg53XTnQ.js";import"./CheckCircle.es-PkF6a2W-.js";import"./Clock.es-DgpzZNmC.js";import"./Warning.es-rGCmkxYb.js";import"./agentAvatars-SvcJfCoY.js";import"./coworkers.config-CbJ9bqM1.js";import"./App-DyVHSnY3.js";import"./index-p7aFGi8o.js";import"./Trash.es-D2Zs5Rpt.js";import"./dissolve-CQo8GAUH.js";import"./AvatarSettingsPage-Ca5mjZEB.js";import"./Image.es-BLTC_PgL.js";import"./Plug.es-D5Zp4G23.js";import"./Plus.es-BeVefyFz.js";import"./ShoppingBag.es-q44epbcw.js";import"./UploadSimple.es-BDJIa312.js";import"./ChatAvatar-w6xrLrWn.js";const j="/assets/cat-customer-service-DyII1rwQ.png",x="/assets/cat-marketing-CDyUX1ld.png",N="/assets/cat-competitors-fFtFF9AM.png",u="/assets/cat-analytics-DpyWuIC5.png",W="/assets/cat-audit-DUGLJVKO.png",p="/assets/cat-productivity-Dsh3CW-Q.png",$={"Customer Service":j,Marketing:x,Competitors:N,Analytics:u,"AI-Friendly Storefront":u,Audit:W,Productivity:p,"Marketing & Campanhas":x,"Ads & Performance":u,"Redes Sociais":x,"Email/CRM":x,WhatsappLogo:j,Operações:p,Produto:p,Financeiro:u,Fornecedores:p,Internacional:N},z=["customer-service","conversion-optimizer","competitor-watch","revenue-intelligence"],_=({cw:s,isInstalled:m,onOpen:o,onInstall:d})=>{const n=b(),{lang:g}=A(),a=F(s.id,g),l=()=>{m?n(`/installed/${s.id}`):o(s)};return t.jsx("div",{className:"group flex flex-col border border-border rounded-2xl bg-background hover:border-foreground
1/50 transition-colors cursor-pointer",onClick:l,children:t.jsxs("div",{className:"p-7 flex-1 flex flex-col gap-3",children:[t.jsxs("div",{className:"flex items-center gap-2.5",children:[t.jsx(P,{coworkerId:s.id,fallbackSrc:$[s.category],fallbackAlt:s.category,size:"xs"}),t.jsx("div",{className:"flex-1 flex items-center justify-between gap-2 min-w-0",children:t.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground leading-tight",children:s.name}),m&&t.jsxs("span",{className:"relative flex h-2 w-2 shrink-0",children:[t.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:"hsl(142 71% 45%)"}}),t.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:"hsl(142 71% 45%)"}})]})]})})]}),t.jsx("p",{className:"text-[13px] text-muted-foreground leading-relaxed",children:D(s.id,s.description)}),s.badge&&t.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[t.jsx("span",{className:"rounded px-1.5 py-0.5 text-[9.5px] font-medium leading-none bg-[hsl(250_60%_92%)] text-[hsl(250_50%_45%)]",children:s.badge}),s.layer&&t.jsx("span",{className:"text-[10px] text-muted-foreground/50",children:s.layer})]}),t.jsxs("div",{className:`mt-auto pt-4 transition-opacity duration-200 ${a?"opacity-0 group-hover:opacity-100":"invisible"}`,children:[t.jsx(T,{marginBottom:4,children:"Resultado esperado"}),t.jsx("p",{className:"text-[12px] text-muted-foreground leading-[1.5] line-clamp-2",children:a})]})]})})},y=["customer-service","conversion-optimizer","revenue-intelligence","competitor-watch","churn-prediction","email-performance"],ge=()=>{b();const[s,m]=c.useState(""),[o,d]=c.useState("Todos"),[n,g]=c.useState(z),[a,l]=c.useState(null),v=["Todos","Ativos","Recomendados"],C=R,i=c.useMemo(()=>{let e=h;return o==="Ativos"?e=e.filter(r=>n.includes(r.id)):o==="Recomendados"?e=e.filter(r=>y.includes(r.id)):o!=="Todos"&&(e=e.filter(r=>r.category===o)),s&&(e=e.filter(r=>r.name.toLowerCase().includes(s.toLowerCase())||r.description.toLowerCase().includes(s.toLowerCase()))),e},[s,o,n]),k=e=>g(r=>r.includes(e)?r.filter(I=>I!==e):[...r,e]),f=e=>e==="Todos"?h.length:e==="Ativos"?n.length:e==="Recomendados"?y.length:h.filter(r=>r.category===e).length,w=n.length;return t.jsxs("div",{className:"bg-background min-h-full flex",children:[t.jsxs("aside",{className:"hidden md:flex flex-col w-52 shrink-0 px-3 pt-4 pb-6 sticky top-0 h-screen overflow-y-auto border-r border-border",children:[v.map(e=>t.jsxs("button",{onClick:()=>d(e),className:`flex items-center justify-between px-3 py-2.5 rounded-lg text-[12.5px] font-medium transition-colors w-full text-left ${o===e?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e,t.jsx("span",{className:"text-[10px] text-muted-foreground/40",children:f(e)})]},e)),t.jsx("div",{className:"my-2 border-t border-border"}),C.map(e=>t.jsxs("button",{onClick:()=>d(e),className:`flex items-center justify-between px-3 py-2.5 rounded-lg text-[12.5px] font-medium transition-colors w-full text-left ${o===e?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[t.jsx("span",{className:"flex-1 min-w-0 truncate",children:e}),t.jsx("span",{className:"text-[10px] text-muted-foreground/40 shrink-0",children:f(e)})]},e))]}),t.jsx("div",{className:"flex-1 min-w-0 px-6 py-10 pb-12",children:t.jsxs("div",{className:"max-w-4xl mx-auto",children:[t.jsxs("div",{className:"flex items-center justify-between gap-6 mb-6",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-foreground font-medium text-2xl",children:"Co-Workers"}),t.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Instale especialistas para trabalhar dentro do ",t.jsx("span",{className:"font-medium text-foreground",children:"Snew"}),"."," ",t.jsxs("span",{className:"text-foreground font-medium",children:[w," ativos"]}),"."]})]}),t.jsxs("div",{className:"flex items-center gap-2 rounded-full px-4 py-2.5 bg-muted w-64 shrink-0",children:[t.jsx(L,{className:"w-3.5 h-3.5 text-muted-foreground shrink-0"}),t.jsx("input",{type:"text",placeholder:"Buscar agentes...",value:s,onChange:e=>m(e.target.value),className:"bg-transparent text-sm outline-none flex-1 placeholder:text-muted-foreground"})]})]}),t.jsx("div",{className:"flex md:hidden items-center gap-1 mb-4 overflow-x-auto pb-1",children:v.map(e=>t.jsxs("button",{onClick:()=>d(e),className:`shrink-0 flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${o===e?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[e,t.jsx("span",{className:"text-[10px] text-muted-foreground
1/50",children:f(e)})]},e))}),o!=="Todos"&&t.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[t.jsx("span",{className:"text-sm font-medium text-foreground",children:o}),t.jsxs("button",{onClick:()=>d("Todos"),className:"text-[11px] text-muted-foreground/60 hover:text-foreground transition-colors flex items-center gap-0.5",children:[t.jsx(M,{className:"w-3 h-3"})," limpar"]})]}),i.length>0?t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-4",children:i.map(e=>t.jsx(_,{cw:e,isInstalled:n.includes(e.id),onOpen:l,onInstall:k},e.id))}):t.jsx("p",{className:"text-sm text-muted-foreground text-center py-12",children:"Nenhum agente encontrado."})]})}),a&&t.jsx(S,{coworker:a,onClose:()=>l(null),onPrev:(()=>{const e=i.findIndex(r=>r.id===a.id);return e>0?()=>l(i[e-1]):void 0})(),onNext:(()=>{const e=i.findIndex(r=>r.id===a.id);return e<i.length-1?()=>l(i[e+1]):void 0})()})]})};export{ge 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.