import{z as g,d as o,j as r,J as i,r as m}from"./main-D6SjkSWq.js";const n=["rgb(0, 100, 80)","rgb(220, 20, 140)","rgb(132, 0, 231)","rgb(30, 50, 100)","rgb(71, 125, 149)","rgb(225, 51, 0)","rgb(71, 125, 149)","rgb(13, 115, 236)","rgb(0, 100, 80)","rgb(80, 55, 80)","rgb(175, 40, 150)","rgb(71, 125, 149)","rgb(233, 20, 41)","rgb(141, 103, 171)","rgb(71, 125, 149)","rgb(225, 17, 140)","rgb(119, 119, 119)","rgb(141, 103, 171)","rgb(216, 64, 0)","rgb(186, 93, 7)","rgb(225, 17, 140)"];function d({genre:e,className:s,size:t}){const{trans:l}=g(),a=e.image,c=o(s,t,"object-cover bg-fg-base/4",a?"block":"flex items-center justify-center"),b=u(e);return r.jsxs("span",{className:o(c,"relative isolate flex items-center justify-center overflow-hidden rounded-panel bg-chip text-xl font-semibold capitalize"),children:[a?r.jsx("img",{className:"absolute inset-0 z-10 h-full w-full object-cover",draggable:!1,loading:"lazy",src:a,alt:l(i("Image for :name",{values:{name:e.name}}))}):null,r.jsx("span",{className:"absolute inset-0 z-20 block h-full w-full",style:{backgroundColor:b,opacity:e.image?.9:1}}),r.jsx("span",{className:"relative z-30 block text-center text-white",children:e.display_name||e.name})]})}function u(e){const s=e.display_name||e.name;return m.useMemo(()=>{const t=(s||"").split("").reduce((l,a)=>a.charCodeAt(0)+l,(s==null?void 0:s.length)||0);return n[t%n.length]},[s])}export{d as G,u};
