import{I as d}from"./ItemsListing-08846369.js";import{I as g,_ as k}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-a4d46145.js";import{M as I}from"./MediaItemImages-a946de02.js";import{d as A,r as V,N as B,c as a,g as D,f as N,e as i,u as c,j as o,i as s,b as l}from"./index-a1b8d248.js";import{m as f}from"./VCheckbox-5797eb11.js";import"./eventbus-142801ce.js";import"./VListItem-99589506.js";import"./ListItem-8ce3726a.js";import"./Button-36db0a16.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./VMenu-a4b04473.js";import"./VCard-62364c90.js";import"./VCardText-426e9876.js";import"./VSpacer-c665d1ef.js";/* empty css              */import"./PanelviewItemCompact-412c96c5.js";import"./VAlert-11c8d9d0.js";import"./Container-6ba8cd4d.js";import"./Toolbar-e7daca02.js";import"./VList-db9ad95c.js";import"./VToolbar-69b0039c.js";import"./VTextField-11675678.js";import"./VCheckboxBtn-b34ea085.js";import"./VInfiniteScroll-b88bd748.js";import"./layout-2c6f8b0d.js";import"./VVirtualScroll-abd3c2c6.js";import"./VDialog-15a0c55b.js";const C=s("br",null,null,-1),M=s("br",null,null,-1),$=s("br",null,null,-1),O=s("br",null,null,-1),lt=A({__name:"ArtistDetails",props:{itemId:{},provider:{}},setup(v){const r=v,t=V(),y=async function(){t.value=await l.getArtist(r.itemId,r.provider)};B(()=>r.itemId,e=>{e&&y()},{immediate:!0});const b=async function(e){return await l.getArtistAlbums(r.itemId,r.provider,e.libraryOnly)},h=async function(e){return await l.getArtistTracks(r.itemId,r.provider,e.libraryOnly)},w=async function(){t.value&&(t.value=await l.sendCommand("music/artists/update",{item_id:t.value.item_id,update:t.value,overwrite:!0}))};return(e,m)=>{var n,u,p;return a(),D("section",null,[N(g,{item:t.value},null,8,["item"]),t.value?(a(),i(d,{key:0,itemtype:"artistalbums","parent-item":t.value,"show-provider":!0,"show-favorites-only-filter":!0,"show-library-only-filter":t.value.provider=="library"&&c(f)(t.value).length>0,"show-album-type-filter":!0,"show-refresh-button":!1,"load-items":b,"sort-keys":["name","sort_name","year"],title:e.$t("albums"),"allow-collapse":!0},null,8,["parent-item","show-library-only-filter","title"])):o("",!0),C,t.value?(a(),i(d,{key:1,itemtype:"artisttracks","parent-item":t.value,"show-provider":!0,"show-favorites-only-filter":!0,"show-library-only-filter":t.value.provider=="library"&&c(f)(t.value).length>0,"show-refresh-button":!1,"show-track-number":!1,"load-items":h,"sort-keys":["name","sort_name","album"],title:e.$t("tracks"),"allow-collapse":!0},null,8,["parent-item","show-library-only-filter","title"])):o("",!0),M,((n=t.value)==null?void 0:n.provider)=="library"&&((p=(u=t.value)==null?void 0:u.metadata)!=null&&p.images)?(a(),i(I,{key:2,modelValue:t.value.metadata.images,"onUpdate:modelValue":[m[0]||(m[0]=_=>t.value.metadata.images=_),w]},null,8,["modelValue"])):o("",!0),$,t.value?(a(),i(k,{key:3,"item-details":t.value},null,8,["item-details"])):o("",!0),O])}}});export{lt as default};
