1import{u as w,G as _,r as d,j as e,f as k,g as v,h as A,m as p,i as x,o as g,A as C,ce as L,ao as G,$ as h}from"./index-d4qdpMx4.js";import Y from"./Footer-BTUKux87.js";const P=()=>{const{i18n:B}=w(),{currentLang:i}=_(),[f,b]=d.useState([]);d.useEffect(()=>{(async()=>{const[l,c]=await Promise.all([h.from("blog_authors").select("name, role_pt, role_en, photo_url, linkedin_url, bio_pt, bio_en, slug").eq("is_active",!0).order("sort_order"),h.from("blog_posts").select("author, tags").eq("is_published",!0)]),m=l.data||[],a=c.data||[],n={};a.forEach(o=>{n[o.author]||(n[o.author]={count:0,tagCounts:{}}),n[o.author].count+=1,(o.tags||[]).forEach(r=>{n[o.author].tagCounts[r]=(n[o.author].tagCounts[r]||0)+1})});const j=m.filter(o=>{var r;return((r=n[o.name])==null?void 0:r.count)>0}).map(o=>{const r=n[o.name]||{count:0,tagCounts:{}},y=Object.entries(r.tagCounts).sort((u,N)=>N[1]-u[1]).slice(0,5).map(([u])=>u);return{...o,count:r.count,tags:y}}).sort((o,r)=>o.name.normalize("NFD").toLowerCase().localeCompare(r.name.normalize("NFD").toLowerCase(),"pt-PT"));b(j)})()},[]);const s=i==="pt";return e.jsxs(e.Fragment,{children:[e.jsxs(k,{children:[e.jsx("html",{lang:i}),e.jsx("title",{children:s?"Autores | Blog Grupo Your":"Authors | Grupo Your Blog"}),e.jsx("meta",{name:"description",content:s?"Conheça os autores do blog do Grupo Your â especialistas em contabilidade, fiscalidade e gestão empresarial.":"Meet the authors of Grupo Your's blog â experts in accounting, taxation and business management."}),e.jsx("meta",{name:"robots",content:"index, follow"}),e.jsx("link",{rel:"canonical",href:`https://grupoyour.com/${i}/blog/${s?"autores":"authors"}`}),e.jsx("link",{rel:"alternate",hrefLang:"pt",href:"https://grupoyour.com/pt/blog/autores"}),e.jsx("link",{rel:"alternate",hrefLang:"en",href:"https://grupoyour.com/en/blog/authors"}),e.jsx("link",{rel:"alternate",hrefLang:"x-default",href:"https://grupoyour.com/pt/blog/autores"}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:`https://grupoyour.com/${i}/blog/${s?"autores":"authors"}`}),e.jsx("meta",{property:"og:title",content:s?"Autores | Blog Grupo Your":"Authors | Grupo Your Blog"}),e.jsx("meta",{property:"og:description",content:s?"Conheça os autores do blog do Grupo Your â especialistas em contabilidade, fiscalidade e gestão empresarial.":"Meet the authors of Grupo Your's blog â experts in accounting, taxation and business management."})]}),e.jsx(v,{}),e.jsx(A,{}),e.jsx("main",{className:"min-h-screen pt-6 pb-20",children:e.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[e.jsxs(p.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"mb-12",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx(x,{className:"w-5 h-5 text-primary"}),e.jsx("span",{className:"text-primary text-sm font-semibold uppercase tracking-wider",children:s?"Autores":"Authors"}),e.jsx("span",{className:"h-px flex-1 bg-border max-w-[80px]"})]}),e.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground mb-3",children:s?"Os Nossos Autores":"Our Authors"}),e.jsx("p",{className:"text-muted-foreground max-w-lg",children:s?"Conheça os especialistas que partilham conhecimento sobre contabilidade, fiscalidade e gestão empresarial.":"Meet the experts who share knowledge about accounting, taxation and business management."})]}),e.jsx("div",{className:"grid gap-6",children:f.map((t,l)=>{const c=s?t.role_pt:t.role_en,m=t.name.split(" ").map(a=>a[0]).join("").slice(0,2);return e.jsxs(p.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:l*.1},className:"flex items-center gap-5 p-6 rounded-2xl bg-card border border-border/60 hover:border-primary/30 transition-colors",children:[t.photo_url?e.jsx("img",{src:t.photo_url,alt:t.name,className:"w-20 h-20 rounded-full object-cover border-2 border-border flex-shrink-0"}):e.jsx("div",{className:"w-20 h-20 rounded-full bg-primary flex items-center justify-center text-lg font-bold text-primary-foreground border-2 border-primary/30 flex-shrink-0",children:m}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:t.name}),e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:c||(s?"Autor":"Author")}),t.tags.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:t.tags.map(a=>e.jsx(g,{to:`/${i}/blog?tag=${encodeURIComponent(a.toLowerCase())}`,className:"text-[11px] px-2 py-0.5 rounded-full bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-colors",children:a},a))}),e.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[e.jsxs(g,{to:L(t.name,i),className:"text-xs text-primary hover:underline flex items-center gap-1",children:[e.jsx(x,{className:"w-3.5 h-3.5"}),t.count," ",t.count===1?s?"artigo":"article":s?"artigos":"articles",e.jsx(C,{className:"w-3 h-3"})]}),t.linkedin_url&&e.jsxs("a",{href:t.linkedin_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground flex items-center gap-1 transition-colors",children:[e.jsx(G,{className:"w-3.5 h-3.5"}),"LinkedIn"]})]})]})]},t.name)}
1)})]})}),e.jsx(Y,{})]})};export{P 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.