1import{D as w,u,r as p,i as v,b as k,j as e,S as y,H as _,L as h}from"./index-BfowBkdf.js";import{C as g}from"./clock-CJ7wLxyD.js";/** 2 * @license lucide-react v0.344.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const C=w("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);function j(t){if(!t)return"";const i=new Date(t),r=["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"];return`${i.getDate()} de ${r[i.getMonth()]} de ${i.getFullYear()}`}function I(){var d,m,x;const{t}=u(),[i,r]=p.useState("todos"),{data:a,loading:b}=v(),{data:c}=k("noticias"),o=c.conteudo,n=p.useMemo(()=>a?i==="todos"?a:a.filter(l=>l.categoria===i):[],[a,i]),[s,...f]=n;return e.jsxs("div",{className:"pt-16 lg:pt-20",children:[e.jsx(y,{titulo:c.seo_titulo,descricao:c.seo_descricao,imagem:c.hero_imagem}),e.jsxs("section",{className:"relative h-[50vh] min-h-[360px] overflow-hidden",children:[e.jsx("img",{loading:"lazy",src:c.hero_imagem||"/homologacao/pexels-38027458.webp",alt:"",className:"h-full w-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/40 to-black/70"}),e.jsxs("div",{className:"container-page absolute inset-0 flex flex-col justify-end pb-10",children:[e.jsxs("p",{className:"eyebrow-white text-white/60 flex items-center gap-2",children:[e.jsx(_,{className:"h-3.5 w-3.5"}),o.chamada]}),e.jsx("h1",{className:"mt-2 font-serif text-4xl font-semibold text-white text-shadow sm:text-5xl lg:text-6xl",children:o.titulo}),e.jsx("p",{className:"mt-3 max-w-xl text-base text-white/80",children:o.subtitulo})]})]}),e.jsx("section",{className:"py-12 lg:py-16",children:e.jsxs("div",{className:"container-page",children:[o.introducao_html&&e.jsx("div",{className:"prose mb-8 max-w-3xl",dangerouslySetInnerHTML:{__html:o.introducao_html}}),e.jsx("div",{className:"mb-10 flex flex-wrap gap-1",children:[{key:"todos",label:t("agenda.todos")},{key:"institucional",label:"Institucional"},{key:"turismo",label:"Turismo"}].map(l=>e.jsx("button",{onClick:()=>r(l.key),className:`px-5 py-2.5 text-xs font-semibold uppercase tracking-wider transition-colors ${i===l.key?"bg-brand-red text-white":"text-ink-600 hover:bg-stone-100"}`,children:l.label},l.key))}),b?e.jsx("div",{className:"h-96 animate-pulse bg-stone-100"}):n.length>0?e.jsxs(e.Fragment,{children:[s&&e.jsxs(h,{to:`/noticias/${s.slug}`,className:"dest-card group relative mb-8 h-[440px] w-full animate-fade-up",children:[s.imagem_capa_url&&e.jsx("img",{loading:"lazy",src:s.imagem_capa_url,alt:((d=s.traducao_pt)==null?void 0:d.titulo)||""}),e.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col justify-end p-8 lg:p-12",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"bg-brand-red px-3 py-1 text-[10px] font-semibold uppercase tracking-widest text-white",children:s.categoria==="institucional"?"Institucional":"Turismo"}),s.modo_criacao==="curadoria"&&e.jsx("span",{className:"border border-white/30 px-2.5 py-1 text-[10px] font-medium uppercase tracking-wider text-white/70",children:"Curadoria"})]}),e.jsx("h2",{className:"mt-4 max-w-2xl font-serif text-3xl font-semibold text-white text-shadow lg:text-4xl",children:(m=s.traducao_pt)==null?void 0:m.titulo}),((x=s.traducao_pt)==null?void 0:x.lead)&&e.jsx("p",{className:"mt-2 max-w-lg text-sm text-white/80 line-clamp-2",children:s.traducao_pt.lead}),e.jsxs("div",{className:"mt-4 flex items-center gap-4 text-xs text-white/60",children:[e.jsx("span",{children:j(s.publicado_em)}),s.autor&&e.jsx("span",{children:s.autor}),s.tempo_leitura&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(g,{className:"h-3 w-3"}),s.tempo_leitura," ",t("noticias.tempoLeitura")]})]})]})]}),e.jsx("div",{className:"grid grid-cols-3 gap-3 sm:gap-4 lg:grid-cols-4 lg:gap-5",children:f.map((l,N)=>e.jsx(M,{noticia:l,index:N},l.id))})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center border border-dashed border-stone-300 bg-stone-50 py-20 text-center",children:[e.jsx(C,{className:"h-10 w-10 text-stone-400",strokeWidth:1.5}),e.jsx("p",{className:"mt-4 text-sm font-medium text-stone-500",children:o.vazio})]})]})})]})}function M({noticia:t,index:i}){const{t:r}=u(),a=t.traducao_pt;return e.jsxs(h,{to:`/noticias/${t.slug}`,className:"group overflow-hidden border border-ink-100 bg-white animate-fade-up",style:{animationDelay:`${i*60}ms`},children:[e.jsxs("div",{className:"relative h-40 overflow-hidden sm:h-48 lg:h-52",children:[t.imagem_capa_url&&e.jsx("img",{loading:"lazy",src:t.imagem_capa_url,alt:(a==null?void 0:a.titulo)||"",className:"h-full w-full object-cover transition-transform duration-700 group-hover:scale-105"}),e.jsxs("div",{className:"absolute left-2 top-2 flex items-center gap-1.5",children:[e.jsx("span",{className:"bg-brand-red px-2 py-0.5 text-[9px] font-semibold uppercase tracking-widest text-white",children:t.categoria==="institucional"?"Inst.":"Turismo"}),t.modo_criacao==="curadoria"&&e.jsx("span",{className:"bg-white/90 px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wider text-ink-600",children:"Curadoria"})]})]}),e.jsxs("div",{className:"p-3 sm:p-4",children:[e.jsx("h3",{className:"font-serif text-sm font-semibold text-ink-900 group-hover:text-brand-red transition-colors line-clamp-3",children:a==null?void 0:a.titulo}),(a==null?void 0:a.lead)&&e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-ink-500 line-clamp-2 hidden sm:block",children:a.lead}),e.jsxs("div",{className:"mt-2 flex items-center justify-between text-[10px] text-ink-400",children:[e.jsx("span",{children:j(t.publicado_em)}),t.tempo_leitura&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(g,{className:"h-3 w-3"}),t.tempo_leitura," ",r("noticias.tempoLeitura")]})]})]})]})}export{I as NoticiasPage};
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.