1import{w as b,j as e,L as y}from"./vendor-react-BOi-fSyC.js";import{$ as N,a0 as v,a1 as w,a2 as C,S,ao as A,a3 as T,f as P,C as E,g as M,an as L,e as $,aE as k,ac as D,ad as O}from"./index-C-7BbcDd.js";import{B}from"./Breadcrumbs-4U4twShw.js";import{M as F}from"./MainBanner-DQdb8RLl.js";import{g as H,m as t,a as c}from"./index-CLH9hvcT.js";import"./vendor-ui-BXC6NyCE.js";import"./vendor-supabase-CRkczR-U.js";function K(){var d;const[m,p]=b(),r=m.get("cat")||"",{showPopup:g,setShowPopup:u}=N(),{showPopup:h,setShowPopup:x}=v(),f=H(),a=r?t.filter(s=>s.categorySlug===r):t,n=s=>{const o=new URLSearchParams;s&&o.set("cat",s),p(o)},j={"@context":"https://schema.org","@type":"ItemList",name:r?`Artigos â ${((d=c(r))==null?void 0:d.title)||"Materiais de Estudo"}`:"Todos os Artigos â Materiais de Estudo",numberOfItems:a.length,itemListElement:a.map((s,o)=>({"@type":"ListItem",position:o+1,url:`https://www.estudacnh.com.br/materiais-de-estudo/${s.slug}`,name:s.title}))};return e.jsxs(e.Fragment,{children:[e.jsx(w,{open:g,onOpenChange:u}),e.jsx(C,{open:h,onOpenChange:x}),e.jsx(S,{title:"Todos os Artigos | Materiais de Estudo CNH",description:"Todos os 45 artigos dos Materiais de Estudo para a prova do DETRAN: legislação, sinalização, direção defensiva, primeiros socorros, mecânica e exame.",canonical:"https://www.estudacnh.com.br/materiais-de-estudo/todos",noindex:!!r}),e.jsx(A,{children:e.jsx("script",{type:"application/ld+json",children:JSON.stringify(j)})}),e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(T,{}),e.jsx("div",{className:"container mx-auto px-4 pt-20",children:e.jsx(B,{items:[{label:"Materiais de Estudo",href:"/materiais-de-estudo"},{label:"Todos os artigos"}]})}),e.jsx(F,{title:"Todos os Artigos",subtitle:`${t.length} artigos cobrindo as 9 áreas da apostila do DETRAN. Filtre por categoria ou navegue por todos.`,icon:P}),e.jsx("section",{className:"py-12",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2 mb-8 justify-center",children:[e.jsxs("button",{onClick:()=>n(""),className:`px-4 py-2 rounded-lg border-2 text-sm font-medium transition-colors ${r?"border-border hover:border-primary":"border-primary bg-primary text-primary-foreground"}`,children:["Todas (",t.length,")"]}),f.map(s=>{const o=t.filter(i=>i.categorySlug===s.slug).length;return e.jsxs("button",{onClick:()=>n(s.slug),className:`px-4 py-2 rounded-lg border-2 text-sm font-medium transition-colors ${r===s.slug?"border-primary bg-primary text-primary-foreground":"border-border hover:border-primary"}`,children:[s.title," (",o,")"]},s.slug)})]}),a.length===0?e.jsx("p",{className:"text-center text-muted-foreground py-12",children:"Nenhum artigo encontrado."}):e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 mb-10",children:a.map((s,o)=>{const i=c(s.categorySlug),l=o<3;return e.jsx(y,{to:`/materiais-de-estudo/${s.slug}`,className:"group",children:e.jsxs(E,{className:"h-full border-2 border-border hover:border-primary transition-colors overflow-hidden",children:[s.image&&e.jsx("div",{className:"aspect-video overflow-hidden bg-muted",children:e.jsx("img",{src:s.image,alt:s.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",loading:l?"eager":"lazy",decoding:"async",...l?{fetchpriority:"high"}:{}})}),e.jsxs(M,{className:"pb-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[i&&e.jsx("span",{className:"text-xs font-bold text-primary bg-primary/10 px-2 py-1 rounded",children:i.title}),e.jsx(L,{className:"w-5 h-5 text-muted-foreground group-hover:text-primary transition-colors"})]}),e.jsx("h3",{className:"text-lg font-bold mt-2 group-hover:text-primary transition-colors line-clamp-2",children:s.title})]}),e.jsxs($,{children:[e.jsx("p",{className:"text-muted-foreground text-sm mb-4 line-clamp-2",children:s.description}),e.jsx("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(k,{className:"w-3 h-3"}),s.readingTime," min"]})})]})]})},s.slug)})})]})}),e.jsx(D,{}),e.jsx(O,{})]})]})}export{K 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.