import{I as m}from"./ItemsListing-7bf0c0b0.js";import{I as b,_ as h}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-30261e03.js";import{d as w,r as n,N as k,c as i,g as _,f as g,e as a,j as o,u,i as c,b as s}from"./index-103db515.js";import{m as p}from"./VCheckbox-ddd5d7c4.js";import{z as I}from"./VListItem-ab7a82e2.js";import"./eventbus-6e1536e2.js";import"./ListItem-91f42136.js";import"./Button-412f73ce.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./VMenu-482e7fbc.js";import"./VCard-d4f085fd.js";import"./VCardText-1a59cac1.js";import"./VSpacer-adcb10ea.js";/* empty css              */import"./PanelviewItemCompact-5ede3757.js";import"./VAlert-4165d2e6.js";import"./Container-d98651c4.js";import"./Toolbar-908bc969.js";import"./VList-cac73f62.js";import"./VToolbar-dcf67568.js";import"./VTextField-73438668.js";import"./VCheckboxBtn-19bafbc9.js";import"./VInfiniteScroll-c2610a44.js";import"./layout-e7ad5131.js";import"./VVirtualScroll-b23fb9a8.js";import"./VDialog-08f8879f.js";const A=c("br",null,null,-1),B=c("br",null,null,-1),Z=w({__name:"ArtistDetails",props:{itemId:{},provider:{}},setup(d){const r=d,t=n(),l=n(!1),f=async function(){l.value=!0,t.value=await s.getArtist(r.itemId,r.provider),l.value=!1};k(()=>r.itemId,e=>{e&&f()},{immediate:!0});const y=async function(e){return await s.getArtistAlbums(r.itemId,r.provider,e.libraryOnly)},v=async function(e){return await s.getArtistTracks(r.itemId,r.provider,e.libraryOnly)};return(e,N)=>(i(),_("section",null,[g(b,{item:t.value},null,8,["item"]),l.value?(i(),a(I,{key:0,indeterminate:""})):o("",!0),t.value?(i(),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"&&u(p)(t.value).length>0,"show-album-type-filter":!0,"show-refresh-button":!1,"load-items":y,"sort-keys":["name","sort_name","year"],title:e.$t("albums"),"allow-collapse":!0},null,8,["parent-item","show-library-only-filter","title"])):o("",!0),A,t.value?(i(),a(m,{key:2,itemtype:"artisttracks","parent-item":t.value,"show-provider":!0,"show-favorites-only-filter":!0,"show-library-only-filter":t.value.provider=="library"&&u(p)(t.value).length>0,"show-refresh-button":!1,"show-track-number":!1,"load-items":v,"sort-keys":["name","sort_name","album"],title:e.$t("tracks"),"allow-collapse":!0},null,8,["parent-item","show-library-only-filter","title"])):o("",!0),B,t.value?(i(),a(h,{key:3,"item-details":t.value},null,8,["item-details"])):o("",!0)]))}});export{Z as default};
