var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opener = _____WB$wombat$assign$function_____("opener");
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[831],{4389:(e,t,r)=>{Promise.resolve().then(r.bind(r,3454))},3454:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var a=r(1047),s=r(8001),l=r.n(s),n=r(6847),i=r(2072),c=r(7305),o=r(2918),d=r(8285);function x(e){let{post:t}=e,r=(0,n.useMemo)(()=>{try{let e=JSON.parse(t.excerpt);return(0,a.jsx)(i.I,{doc:e})}catch(e){return(0,a.jsx)(c.oz,{remarkPlugins:[d.A],rehypePlugins:[o.A],components:{img:e=>{let{node:t,...r}=e;return r.src?(0,a.jsx)("img",{...r,alt:r.alt||"",className:"max-w-full my-2",loading:"lazy"}):null}},children:t.excerpt})}},[t.excerpt]),s=Array.isArray(t.imagens)?t.imagens:[t.imagens];return(0,a.jsxs)("div",{className:"bg-white dark:bg-gray-900 p-6 rounded-xl border border-gray-200 dark:border-gray-700 hover:shadow-xl transition-all duration-300 group",children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold mb-4 text-gray-900 dark:text-white",children:t.title}),(0,a.jsx)("div",{className:"text-gray-700 dark:text-gray-300 mb-4",children:r}),s&&s.length>0&&(0,a.jsx)("div",{className:"mb-4 grid grid-cols-2 gap-2",children:s.map((e,r)=>e?(0,a.jsx)("img",{src:e,alt:"Imagem do post ".concat(t.title," ").concat(r+1),className:"object-cover rounded-md",loading:"lazy"},r):null)}),(0,a.jsx)(l(),{href:"/blog/".concat(t.id),children:(0,a.jsx)("button",{className:"mt-4 inline-block bg-blue-700 hover:bg-blue-800 text-white px-5 py-2 rounded-full font-medium transition-all",children:"Continuar Lendo"})})]})}function m(){let[e,t]=(0,n.useState)([]),[r,s]=(0,n.useState)(!0),[l,i]=(0,n.useState)(null);return((0,n.useEffect)(()=>{(async function(){try{let e=await fetch("/api/posts");if(!e.ok)throw Error("Erro: ".concat(e.status," ").concat(e.statusText));let r=await e.json();t(r)}catch(e){i(e.message)}finally{s(!1)}})()},[]),r)?(0,a.jsx)("div",{children:"Carregando..."}):l?(0,a.jsxs)("div",{children:["Erro ao carregar posts: ",l]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{className:"relative w-full h-[60vh] flex items-center justify-center text-white text-center bg-cover bg-center",style:{backgroundImage:"url('images/bg-blog.webp')"},children:[(0,a.jsx)("div",{className:"bg-black/60 absolute inset-0 backdrop-blur-sm z-0"}),(0,a.jsxs)("div",{className:"z-10 px-4 max-w-3xl",children:[(0,a.jsx)("p",{className:"text-sm uppercase tracking-wide text-blue-300 mb-2",children:"Conte\xfado para profissionais e empreendedores digitais"}),(0,a.jsx)("h1",{className:"text-4xl sm:text-5xl font-extrabold",children:"Um blog sobre desenvolvimento, tecnologia e presen\xe7a digital"})]})]}),(0,a.jsxs)("div",{className:"container mx-auto py-16 px-4",children:[(0,a.jsx)("h2",{className:"text-4xl font-bold mb-8 text-center text-gray-900 dark:text-white",children:"Blog"}),(0,a.jsx)("p",{className:"text-center text-gray-600 dark:text-gray-400 max-w-2xl mx-auto mb-10",children:"Aqui voc\xea encontra artigos pr\xe1ticos e insights sobre desenvolvimento web, interfaces modernas e estrat\xe9gias digitais."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:e.map(e=>(0,a.jsx)(x,{post:e},e.id))})]})]})}},2072:(e,t,r)=>{"use strict";r.d(t,{I:()=>s});var a=r(1047);function s(e){let{doc:t}=e;return(0,a.jsx)("div",{children:function e(t,r){var s,l,n;switch(t.type){case"doc":return null===(s=t.content)||void 0===s?void 0:s.map((t,r)=>e(t,r));case"paragraph":return(0,a.jsx)("p",{style:{textAlign:(null===(l=t.attrs)||void 0===l?void 0:l.textAlign)||"left"},children:null===(n=t.content)||void 0===n?void 0:n.map((t,r)=>e(t,r))},r);case"text":return t.text;default:return null}}(t,0)})}r(6847)}},e=>{var t=t=>e(e.s=t);e.O(0,[1,854,721,59,358],()=>t(4389)),_N_E=e.O()}]);
}