import{b as h,j as e,a as l,B as n,L as i,H as u,A as b}from"./index-CdG8kR3s.js";import{F as c}from"./Footer-Dk4ZFtbI.js";import{d as j,b as f}from"./useBlogArticles-DCXVoj4d.js";import{L as y,E as N}from"./loader-circle-DdalTZYf.js";import{A as v}from"./arrow-left-CC_9TxHG.js";import{C as w}from"./calendar-BUuw8VQz.js";import{C as B}from"./clock-CMT4KK2C.js";import"./map-pin-7Jd8nbT_.js";import"./useQuery-C67zgcbK.js";import"./client-hnwrjGz7.js";const C=a=>new Date(a).toLocaleDateString("pt-BR",{day:"numeric",month:"long",year:"numeric"}),L=a=>a>=1e3?`${(a/1e3).toFixed(1)}k`:a.toString(),$=({article:a})=>e.jsxs("article",{className:"bg-card rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1",children:[e.jsx("div",{className:"relative h-48 bg-gradient-to-br from-primary/20 to-primary/5",children:a.image_url?e.jsx("img",{src:a.image_url,alt:a.title,className:"w-full h-full object-cover",loading:"lazy"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsx("span",{className:"text-4xl font-bold text-primary/30",children:a.title.charAt(0)})})}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center space-x-3 text-xs text-muted-foreground mb-3",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(w,{className:"w-3 h-3"}),e.jsx("span",{children:C(a.published_at)})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(B,{className:"w-3 h-3"}),e.jsxs("span",{children:[a.read_time_minutes," min"]})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(N,{className:"w-3 h-3"}),e.jsx("span",{children:L(a.views)})]})]}),e.jsx("h3",{className:"text-lg font-bold text-card-foreground mb-3 line-clamp-2",children:a.title}),e.jsx("p",{className:"text-muted-foreground text-sm mb-4 line-clamp-3",children:a.excerpt}),e.jsx(n,{asChild:!0,variant:"outline",size:"sm",className:"w-full border-primary text-primary hover:bg-primary hover:text-primary-foreground",children:e.jsxs(i,{to:`/blog/${a.slug}`,children:["Ler Mais",e.jsx(b,{className:"w-3 h-3 ml-2"})]})})]})]}),F=()=>{const{categorySlug:a}=h(),{data:m,isLoading:d}=j(a||""),{data:o}=f(),{category:t,articles:r}=m||{category:null,articles:[]};if(d)return e.jsx("div",{className:"min-h-screen bg-muted flex items-center justify-center",children:e.jsx(y,{className:"w-8 h-8 animate-spin text-primary"})});if(!t)return e.jsxs("div",{className:"min-h-screen bg-muted",children:[e.jsx(l,{}),e.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-20 text-center",children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground mb-4",children:"Categoria não encontrada"}),e.jsx("p",{className:"text-muted-foreground mb-8",children:"A categoria que você procura não existe."}),e.jsx(n,{asChild:!0,children:e.jsx(i,{to:"/blog",children:"Voltar ao Blog"})})]}),e.jsx(c,{})]});const x={"@context":"https://schema.org","@type":"CollectionPage",name:`${t.name} - Blog Jurídico`,description:t.description||`Artigos sobre ${t.name}. Tire suas dúvidas com a especialista Dra. Nathalia Brito.`,url:`https://nathaliabrito.adv.br/blog/categoria/${t.slug}`,inLanguage:"pt-BR",isPartOf:{"@type":"Blog",name:"Blog Jurídico - Dra. Nathalia Brito",url:"https://nathaliabrito.adv.br/blog"},mainEntity:{"@type":"ItemList",numberOfItems:r.length,itemListElement:r.map((s,g)=>({"@type":"ListItem",position:g+1,url:`https://nathaliabrito.adv.br/blog/${s.slug}`,name:s.title}))}},p={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://nathaliabrito.adv.br"},{"@type":"ListItem",position:2,name:"Blog",item:"https://nathaliabrito.adv.br/blog"},{"@type":"ListItem",position:3,name:t.name,item:`https://nathaliabrito.adv.br/blog/categoria/${t.slug}`}]};return e.jsxs(e.Fragment,{children:[e.jsxs(u,{children:[e.jsxs("title",{children:[t.name," | Blog Jurídico | Dra. Nathalia Brito"]}),e.jsx("meta",{name:"description",content:t.description||`Artigos sobre ${t.name}. Tire suas dúvidas com a especialista Dra. Nathalia Brito.`}),e.jsx("link",{rel:"canonical",href:`https://nathaliabrito.adv.br/blog/categoria/${t.slug}`}),e.jsx("meta",{property:"og:title",content:`${t.name} | Blog Jurídico`}),e.jsx("meta",{property:"og:description",content:t.description||`Artigos sobre ${t.name}. Tire suas dúvidas com a especialista Dra. Nathalia Brito.`}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:`https://nathaliabrito.adv.br/blog/categoria/${t.slug}`}),e.jsx("meta",{property:"og:image",content:"https://nathaliabrito.adv.br/lovable-uploads/24fb34b9-953e-4d4f-ad12-600d39278a4d.png"}),e.jsx("meta",{property:"og:locale",content:"pt_BR"}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:`${t.name} | Blog Jurídico`}),e.jsx("meta",{name:"twitter:description",content:t.description||`Artigos sobre ${t.name}. Tire suas dúvidas.`}),e.jsx("meta",{name:"twitter:image",content:"https://nathaliabrito.adv.br/lovable-uploads/24fb34b9-953e-4d4f-ad12-600d39278a4d.png"}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(x)}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(p)})]}),e.jsxs("div",{className:"min-h-screen bg-muted",children:[e.jsx(l,{}),e.jsx("section",{className:"bg-gradient-to-br from-primary via-primary/90 to-primary text-primary-foreground py-12",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs(i,{to:"/blog",className:"inline-flex items-center text-primary-foreground/80 hover:text-primary-foreground mb-6 transition-colors",children:[e.jsx(v,{className:"w-4 h-4 mr-2"}),"Voltar ao Blog"]}),e.jsx("h1",{className:"text-3xl lg:text-4xl font-bold mb-4",children:t.name}),t.description&&e.jsx("p",{className:"text-xl text-primary-foreground/80",children:t.description})]})}),e.jsx("section",{className:"py-16",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"grid lg:grid-cols-4 gap-8",children:[e.jsxs("div",{className:"lg:col-span-3",children:[e.jsxs("p",{className:"text-muted-foreground mb-8",children:[r.length," ",r.length===1?"artigo encontrado":"artigos encontrados"]}),r.length>0?e.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:r.map(s=>e.jsx($,{article:s},s.id))}):e.jsx("div",{className:"text-center py-12 bg-card rounded-xl",children:e.jsx("p",{className:"text-muted-foreground",children:"Ainda não há artigos nesta categoria."})})]}),e.jsxs("div",{className:"space-y-8",children:[o&&o.length>0&&e.jsxs("div",{className:"bg-card rounded-xl shadow-lg p-6",children:[e.jsx("h3",{className:"text-lg font-bold text-card-foreground mb-4",children:"Todas as Categorias"}),e.jsx("div",{className:"space-y-2",children:o.map(s=>e.jsx(i,{to:`/blog/categoria/${s.slug}`,className:`block py-2 px-3 rounded-lg transition-colors duration-200 ${s.slug===a?"bg-primary text-primary-foreground font-medium":"text-muted-foreground hover:text-primary hover:bg-primary/5"}`,children:s.name},s.id))})]}),e.jsxs("div",{className:"bg-gradient-to-br from-primary to-primary/80 rounded-xl p-6 text-primary-foreground",children:[e.jsx("h3",{className:"text-lg font-bold mb-4",children:"Precisa de Ajuda?"}),e.jsx("p",{className:"text-primary-foreground/80 text-sm mb-4",children:"Agende uma consulta gratuita e esclareça suas dúvidas com nossa especialista."}),e.jsx(n,{asChild:!0,className:"w-full bg-accent hover:bg-accent/90 text-accent-foreground",children:e.jsx(i,{to:"/consulta",children:"Consulta Gratuita"})})]})]})]})})}),e.jsx(c,{})]})]})};export{F as default};