import{j as e}from"./vendor-ui-CUslpDkL.js";import{u as d}from"./vendor-query-CN1EccJz.js";import{u as c,n as m,C as x,b as h,s as g}from"./index-CJqEbhJN.js";import{L as p}from"./vendor-react-Dg0Tra3e.js";import{B as u}from"./badge-But4vkun.js";import{C as i,b as n,a as l,c as j,d as f}from"./card-BSxrPlO5.js";import"./vendor-supabase-yzuDJZPy.js";import"./vendor-motion-CiNtJfg1.js";function B(){const{t:a}=c(),{data:r,isLoading:o}=d({queryKey:["blog-posts"],queryFn:async()=>{const{data:s,error:t}=await g.from("blog_posts").select("*").order("created_at",{ascending:!1});if(t)throw t;return s}});return e.jsxs(e.Fragment,{children:[e.jsxs(m,{children:[e.jsx("title",{children:"Anime Blog | What-Anime.com"}),e.jsx("meta",{name:"description",content:"Guides, tips, and articles to help you identify anime from screenshots and explore the anime world."}),e.jsx("meta",{property:"og:title",content:"Anime Blog | What-Anime.com"}),e.jsx("meta",{property:"og:description",content:"Guides, tips, and articles to help you identify anime from screenshots and explore the anime world."}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:"Anime Blog | What-Anime.com"}),e.jsx("meta",{name:"twitter:description",content:"Guides, tips, and articles to help you identify anime from screenshots and explore the anime world."}),e.jsx("link",{rel:"canonical",href:"https://what-anime.com/blog"})]}),e.jsx("div",{className:"min-h-screen py-8 px-4",children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4 bg-gradient-to-r from-primary via-primary-glow to-accent bg-clip-text text-transparent",children:a("blog.title")}),e.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:a("blog.description")})]}),o?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[...Array(6)].map((s,t)=>e.jsxs(i,{className:"glass-card animate-pulse",children:[e.jsxs(n,{children:[e.jsx("div",{className:"h-6 bg-muted rounded mb-2"}),e.jsx("div",{className:"h-4 bg-muted rounded w-3/4"})]}),e.jsx(l,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-3 bg-muted rounded"}),e.jsx("div",{className:"h-3 bg-muted rounded"}),e.jsx("div",{className:"h-3 bg-muted rounded w-2/3"})]})})]},t))}):r&&r.length>0?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:r.map(s=>e.jsx(p,{to:`/blog/${s.slug}`,children:e.jsxs(i,{className:"glass-card h-full transition-all duration-300 hover:scale-105 hover:shadow-neon group",children:[s.cover_image_url&&e.jsx("div",{className:"relative overflow-hidden rounded-t-lg",children:e.jsx("img",{src:s.cover_image_url,alt:s.title,className:"w-full h-48 object-cover transition-transform duration-300 group-hover:scale-110"})}),e.jsxs(n,{children:[e.jsx("div",{className:"flex items-center gap-2 mb-2",children:e.jsx(u,{variant:"secondary",className:"text-xs",children:s.category})}),e.jsx(j,{className:"text-xl group-hover:text-primary transition-colors",children:s.title}),e.jsx(f,{className:"line-clamp-2",children:s.excerpt})]}),e.jsx(l,{children:e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(x,{className:"h-4 w-4"}),e.jsx("span",{children:new Date(s.created_at).toLocaleDateString()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(h,{className:"h-4 w-4"}),e.jsxs("span",{children:[s.read_time_minutes," ",a("blog.minRead")]})]})]})})]})},s.id))}):e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-muted-foreground",children:a("blog.noPosts")})})]})})]})}export{B as default};