import{_ as n}from"./ItemsListing.vue_vue_type_style_index_0_lang-02893598.js";import{_ as y,a as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-9ad4f695.js";import{d as b,r as h,o as _,b as a,ah as w,a as k,I as A,c as i,h as I,f as g,e as o,u as m,j as s,g as p,aj as u}from"./index-0ae84607.js";import"./ListviewItem-156d947d.js";import"./VBadge-bfb26993.js";import"./Container-eb92362b.js";import"./forwardRefs-d0d7c5bd.js";import"./Button-a1dfd3f5.js";import"./VMenu-f26d3a19.js";/* empty css              */import"./VInput-00e20677.js";import"./VSlideGroup-18f8a11f.js";import"./VCard-e96ab32b.js";import"./VCardText-b1a0de89.js";import"./VTooltip-054ea37d.js";import"./PanelviewItem.vue_vue_type_style_index_0_lang-a0b4c306.js";import"./contextmenu-5ae46870.js";import"./Alert-ee4ff93d.js";import"./VAlert-212471f5.js";import"./VToolbar-b7dd8339.js";import"./VTextField-4bf39c0d.js";import"./VVirtualScroll-06bbaaf5.js";import"./layout-f3684635.js";import"./VDialog-2b5eada8.js";const D=p("br",null,null,-1),$=p("br",null,null,-1),Y=b({__name:"ArtistDetails",props:{itemId:{},provider:{}},setup(c){const r=c,t=h(),l=async function(){t.value=await a.getArtist(r.itemId,r.provider)};_(()=>{if(r.provider=="library"){const e=a.subscribe(w.MEDIA_ITEM_UPDATED,l,`library://artist/${r.itemId}`);k(e)}}),A(()=>r.itemId,e=>{e&&l()},{immediate:!0});const d=async function(e){return await a.getArtistAlbums(r.itemId,r.provider,e.libraryOnly)},f=async function(e){return await a.getArtistTracks(r.itemId,r.provider,e.libraryOnly)};return(e,B)=>(i(),I("section",null,[g(y,{item:t.value},null,8,["item"]),t.value?(i(),o(n,{key:0,itemtype:"artisttracks","parent-item":t.value,"show-provider":!0,"show-favorites-only-filter":!0,"show-library-only-filter":t.value.provider=="library"&&m(u)(t.value).length>0,"show-refresh-button":!1,"show-track-number":!1,"load-items":f,"sort-keys":["name","sort_name","album"],title:e.$t("tracks"),"allow-collapse":!0},null,8,["parent-item","show-library-only-filter","title"])):s("",!0),D,t.value?(i(),o(n,{key:1,itemtype:"artistalbums","parent-item":t.value,"show-provider":!0,"show-favorites-only-filter":!0,"show-library-only-filter":t.value.provider=="library"&&m(u)(t.value).length>0,"show-refresh-button":!1,"load-items":d,"sort-keys":["name","sort_name","year"],title:e.$t("albums"),"allow-collapse":!0},null,8,["parent-item","show-library-only-filter","title"])):s("",!0),$,t.value?(i(),o(v,{key:2,"item-details":t.value},null,8,["item-details"])):s("",!0)]))}});export{Y as default};
