import{j as e}from"./vendor-ui-CUslpDkL.js";import{L as h}from"./vendor-react-Dg0Tra3e.js";import{u as x}from"./vendor-query-CN1EccJz.js";import{c as r,u,n as g,x as l,G as i,H as c,U as k,s as f}from"./index-CJqEbhJN.js";import{C as w,a as j}from"./card-BSxrPlO5.js";import{S as M}from"./search-RJS4XthK.js";import{T as b}from"./trophy-boV7oWzg.js";import{W as v}from"./wand-sparkles-BA-wznA0.js";import{F as N}from"./flame-DnD4Z7Bh.js";import{Z as S}from"./zap-CkbLqKyG.js";import"./vendor-supabase-yzuDJZPy.js";import"./vendor-motion-CiNtJfg1.js";/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const q=r("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const A=r("Drama",[["path",{d:"M10 11h.01",key:"d2at3l"}],["path",{d:"M14 6h.01",key:"k028ub"}],["path",{d:"M18 6h.01",key:"1v4wsw"}],["path",{d:"M6.5 13.1h.01",key:"1748ia"}],["path",{d:"M22 5c0 9-4 12-6 12s-6-3-6-12c0-2 2-3 6-3s6 1 6 3",key:"172yzv"}],["path",{d:"M17.4 9.9c-.8.8-2 .8-2.8 0",key:"1obv0w"}],["path",{d:"M10.1 7.1C9 7.2 7.7 7.7 6 8.6c-3.5 2-4.7 3.9-3.7 5.6 4.5 7.8 9.5 8.4 11.2 7.4.9-.5 1.9-2.1 1.9-4.7",key:"rqjl8i"}],["path",{d:"M9.1 16.5c.3-1.1 1.4-1.7 2.4-1.4",key:"1mr6wy"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const C=r("Gamepad",[["line",{x1:"6",x2:"10",y1:"12",y2:"12",key:"161bw2"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"15",x2:"15.01",y1:"13",y2:"13",key:"dqpgro"}],["line",{x1:"18",x2:"18.01",y1:"11",y2:"11",key:"meh2c"}],["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G=r("Ghost",[["path",{d:"M9 10h.01",key:"qbtxuw"}],["path",{d:"M15 10h.01",key:"1qmjsl"}],["path",{d:"M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z",key:"uwwb07"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const L=r("Laugh",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M18 13a6 6 0 0 1-6 5 6 6 0 0 1-6-5h12Z",key:"b2q4dd"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F=r("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const B=r("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D=r("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const z=r("Sword",[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}]]),H={Action:z,Adventure:i,Comedy:L,Drama:A,Fantasy:l,Horror:G,Mystery:M,Romance:c,"Sci-Fi":D,"Slice of Life":F,Sports:b,Supernatural:v,Thriller:N,Mecha:C,Isekai:i,Shounen:S,Shoujo:c,Seinen:k,Psychological:q,Music:B},J=()=>{const{t:s}=u(),{data:n,isLoading:m}=x({queryKey:["genres"],queryFn:async()=>{const{data:a,error:t}=await f.from("genres").select("*").order("show_count",{ascending:!1,nullsFirst:!1});if(t)throw t;return a}}),d=a=>s(`genres.names.${a}`,{defaultValue:""})||a,y=(a,t)=>s(`genres.descriptions.${a}`,{defaultValue:""})||t||"";return e.jsxs(e.Fragment,{children:[e.jsxs(g,{children:[e.jsx("title",{children:"Anime Genres - Browse by Category | What-Anime"}),e.jsx("meta",{name:"description",content:"Explore anime by genre. Browse Action, Romance, Sci-Fi, Horror, Isekai, and 15+ other anime genres. Find your next favorite anime series."}),e.jsx("link",{rel:"canonical",href:"https://www.what-anime.com/genres"}),e.jsx("meta",{property:"og:title",content:"Anime Genres - Browse by Category"}),e.jsx("meta",{property:"og:description",content:"Explore anime by genre. Browse Action, Romance, Sci-Fi, and more."}),e.jsx("meta",{property:"og:url",content:"https://www.what-anime.com/genres"}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"CollectionPage",name:"Anime Genres",description:"Browse anime by genre",url:"https://www.what-anime.com/genres",numberOfItems:n?.length||0})})]}),e.jsxs("main",{className:"container mx-auto px-4 py-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4",children:s("genres.title")}),e.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:s("genres.description")})]}),m?e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:[...Array(16)].map((a,t)=>e.jsx("div",{className:"h-40 bg-muted rounded-xl animate-pulse"},t))}):e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:n?.map(a=>{const t=H[a.name]||l,o=d(a.name),p=y(a.name,a.description);return e.jsx(h,{to:`/genre/${a.slug}`,className:"group",children:e.jsx(w,{className:"h-full overflow-hidden border-0 bg-primary/5 border-l-3 border-primary transition-all duration-300 hover:scale-105 hover:shadow-xl",children:e.jsxs(j,{className:"p-6 h-full flex flex-col",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mb-4 transition-transform group-hover:scale-110 bg-primary/20",children:e.jsx(t,{className:"w-6 h-6 text-primary"})}),e.jsx("h2",{className:"text-xl font-bold mb-2 group-hover:text-primary transition-colors",children:o}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 flex-1",children:p}),e.jsxs("div",{className:"mt-4 text-sm font-medium text-primary",children:[a.show_count||0," ",s("genres.anime")]})]})})},a.id)})})]})]})};export{J as default};