import{I as m}from"./ItemsListing-db2c60f3.js";import{I as y,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-47aa75bc.js";import{d as b,r as h,o as w,b as i,af as _,a as k,J as I,c as o,g,f as A,e as a,u as n,j as s,i as u,ah as p}from"./index-2dd0c7d2.js";import"./ListviewItem-a6570b10.js";import"./helpers-4d7c5bf6.js";import"./Container-fdf4c1f5.js";import"./VListItem-cb387084.js";import"./_plugin-vue_export-helper-c27b6911.js";/* empty css              */import"./VLabel-1f522f96.js";import"./VList-d110868a.js";import"./VCard-907b4685.js";import"./VCardText-0ed41581.js";import"./VMenu-97c1c955.js";import"./ListItem-87435fbb.js";import"./Button-69b906cf.js";import"./VTooltip-e62b61bd.js";import"./VCheckboxBtn-c3f9b6ff.js";import"./PanelviewItem-68416368.js";import"./VSpacer-e11897c6.js";import"./Alert-65a1093b.js";import"./VAlert-4eed3112.js";import"./Toolbar-1720c469.js";import"./VBadge-91055b8b.js";import"./VToolbar-6047eebf.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_7aadaa8c_lang-7ff19a96.js";import"./eventbus-d154090d.js";import"./VTextField-de7279c6.js";import"./VVirtualScroll-660ff9a6.js";import"./VSnackbar-6950ff68.js";import"./layout-42d7f450.js";import"./VDialog-e187bf14.js";const D=u("br",null,null,-1),B=u("br",null,null,-1),st=b({__name:"ArtistDetails",props:{itemId:{},provider:{}},setup(c){const r=c,t=h(),l=async function(){t.value=await i.getArtist(r.itemId,r.provider)};w(()=>{if(r.provider=="library"){const e=i.subscribe(_.MEDIA_ITEM_UPDATED,l,`library://artist/${r.itemId}`);k(e)}}),I(()=>r.itemId,e=>{e&&l()},{immediate:!0});const d=async function(e){return await i.getArtistAlbums(r.itemId,r.provider,e.libraryOnly)},f=async function(e){return await i.getArtistTracks(r.itemId,r.provider,e.libraryOnly)};return(e,E)=>(o(),g("section",null,[A(y,{item:t.value},null,8,["item"]),t.value?(o(),a(m,{key:0,itemtype:"artisttracks","parent-item":t.value,"show-provider":!0,"show-favorites-only-filter":!0,"show-library-only-filter":t.value.provider=="library"&&n(p)(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?(o(),a(m,{key:1,itemtype:"artistalbums","parent-item":t.value,"show-provider":!0,"show-favorites-only-filter":!0,"show-library-only-filter":t.value.provider=="library"&&n(p)(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),B,t.value?(o(),a(v,{key:2,"item-details":t.value},null,8,["item-details"])):s("",!0)]))}});export{st as default};
