import{as as a,W as l,r as u,j as c,v as f,d as m}from"./main-D6SjkSWq.js";function g({album:s,artist:e,className:t,target:n}){!e&&s.artists&&(e=s.artists[0]);const i=u.useMemo(()=>d(s,{artist:e}),[e,s]);return c.jsx(f,{target:n,className:m("overflow-x-hidden overflow-ellipsis outline-none hover:underline focus-visible:underline",t),to:i,children:s.name})}function d(s,e={}){var o;const t=e.artist||((o=s.artists)==null?void 0:o[0]),n=a((t==null?void 0:t.name)||"Various Artists"),i=a(s.name);let r=`/album/${s.id}/${n}/${i}`;return e.absolute&&(r=`${l().settings.base_url}${r}`),r}export{g as A,d as g};
