1import{g as i,j as e,L as r,h as c}from"./index-6GNpqfaL.js";import{H as n,F as x}from"./Footer-Dm0UxlaK.js";import{A as m}from"./AdSlot-PnCTpGVW.js";import"./ads-0NjbpgnU.js";function f(){const{featured:a,latest:l,counts:d,cities:o}=i.useLoaderData();return e.jsxs("div",{className:"flex min-h-screen flex-col",children:[e.jsx(n,{}),e.jsxs("main",{className:"flex-1",children:[e.jsx("header",{className:"border-b border-border bg-gradient-to-br from-gold/10 via-transparent to-transparent",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-5 py-12",children:[e.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-gold",children:"Guia comercial"}),e.jsx("h1",{className:"mt-2 font-display text-4xl font-bold md:text-5xl",children:"Empresas e serviços do Triângulo Mineiro"}),e.jsx("p",{className:"mt-3 max-w-2xl text-muted-foreground",children:"Encontre comércios, prestadores e marcas locais por cidade ou categoria. Cadastre a sua empresa gratuitamente."}),e.jsx("div",{className:"mt-5",children:e.jsx(r,{to:"/guia/cadastrar",className:"inline-flex items-center rounded-full bg-gold px-5 py-2.5 text-sm font-semibold text-black hover:bg-gold/90",children:"Cadastrar empresa"})})]})}),e.jsx("div",{className:"mx-auto max-w-7xl px-5 pt-5",children:e.jsx(m,{position:"guia_top"})}),e.jsx("section",{className:"border-b border-border bg-surface/30",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-5 py-10",children:[e.jsx("h2",{className:"mb-5 font-display text-xl font-bold",children:"Categorias"}),e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6",children:c.map(s=>e.jsxs(r,{to:"/guia/categoria/$cat",params:{cat:s.slug},className:"group rounded-xl border border-border bg-surface p-4 text-center transition hover:border-gold",children:[e.jsx("div",{className:"text-2xl",children:s.icon}),e.jsx("div",{className:"mt-1 text-sm font-semibold group-hover:text-gold",children:s.name}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[d[s.slug]??0," ",(d[s.slug]??0)===1?"empresa":"empresas"]})]},s.slug))})]})}),a.length>0&&e.jsxs("section",{className:"mx-auto max-w-7xl px-5 py-10",children:[e.jsx("h2",{className:"mb-5 font-display text-xl font-bold",children:"Em destaque"}),e.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:a.map(s=>e.jsx(t,{b:s},s.id))})]}),e.jsx("section",{className:"border-t border-border bg-surface/20",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-5 py-10",children:[e.jsx("h2",{className:"mb-5 font-display text-xl font-bold",children:"Cadastros recentes"}),l.length===0?e.jsx("p",{className:"text-muted-foreground",children:"Ainda não há empresas cadastradas. Seja a primeira."}):e.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:l.map(s=>e.jsx(t,{b:s},s.id))})]})}),e.jsxs("section",{className:"mx-auto max-w-7xl px-5 py-10",children:[e.jsx("h2",{className:"mb-5 font-display text-xl font-bold",children:"Por cidade"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(s=>e.jsx(r,{to:"/cidade/$slug",params:{slug:s.slug},className:"rounded-full border border-border bg-surface px-3.5 py-1.5 text-sm hover:border-gold hover:text-gold",children:s.name},s.slug))})]})]}),e.jsx(x,{})]})}function t({b:a}){return e.jsxs(r,{to:"/guia/$slug",params:{slug:a.slug},className:"group flex gap-4 rounded-xl border border-border bg-surface p-4 transition hover:border-gold",children:[e.jsx("div",{className:"h-16 w-16 flex-none overflow-hidden rounded-lg bg-foreground
1/5",children:a.logo_url?e.jsx("img",{src:a.logo_url,alt:a.name,className:"h-full w-full object-cover",loading:"lazy"}):e.jsx("div",{className:"grid h-full w-full place-items-center text-2xl text-muted-foreground",children:"ð·ï¸"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[a.is_featured&&e.jsx("span",{className:"rounded-full bg-gold/15 px-1.5 text-[10px] font-bold uppercase text-gold",children:"Destaque"}),e.jsx("h3",{className:"truncate font-semibold group-hover:text-gold",children:a.name})]}),a.description&&e.jsx("p",{className:"mt-1 line-clamp-2 text-sm text-muted-foreground",children:a.description}),e.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 text-[11px] text-muted-foreground",children:[a.city&&e.jsxs("span",{children:["ð ",a.city.name]}),e.jsxs("span",{children:["· ",a.category]})]})]})]})}export{f as component};
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.