import{I as m}from"./ItemsListing-e7c9377b.js";import{I as c,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-612520ab.js";import{d as f,r as h,N as y,c as a,g as k,f as b,e as o,u as w,j as i,i as l,b as s}from"./index-e34071c2.js";import{m as _}from"./VCheckbox-081529bb.js";import"./eventbus-edb4a70e.js";import"./VListItem-6fb16d04.js";import"./ListItem-f09faddc.js";import"./Button-d52131a6.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./VMenu-8ea0aa0a.js";import"./VCard-0f63f60c.js";import"./VCardText-2a290ffe.js";import"./VSpacer-b7ae4876.js";/* empty css              */import"./PanelviewItemCompact-8de8744a.js";import"./VAlert-cd8a958f.js";import"./Container-1af89f37.js";import"./Toolbar-bbf3d11a.js";import"./VList-5a526902.js";import"./VToolbar-790d92bd.js";import"./VTextField-df721147.js";import"./VCheckboxBtn-43c6a5b9.js";import"./VInfiniteScroll-311fcdfe.js";import"./layout-4fa46c33.js";import"./VVirtualScroll-8b839030.js";import"./VDialog-57dacf99.js";const I=l("br",null,null,-1),g=l("br",null,null,-1),T=l("br",null,null,-1),Z=f({__name:"TrackDetails",props:{itemId:{},provider:{},album:{}},setup(n){const r=n,e=h(),p=async function(){e.value=await s.getTrack(r.itemId,r.provider,r.album)};y(()=>r.itemId,t=>{t&&p()},{immediate:!0});const u=async function(t){return await s.getTrackVersions(e.value.item_id,e.value.provider)},d=async function(t){return await s.getTrackAlbums(r.itemId,r.provider,t.libraryOnly)};return(t,V)=>(a(),k("section",null,[b(c,{item:e.value,"active-provider":t.provider},null,8,["item","active-provider"]),e.value?(a(),o(m,{key:0,itemtype:"trackalbums","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-library-only-filter":e.value.provider=="library"&&w(_)(e.value).length>0,"show-track-number":!1,"show-refresh-button":!1,"load-items":d,"sort-keys":["name","sort_name","year","year_desc"],title:t.$t("appears_on"),path:t.provider+t.itemId,"allow-collapse":!0},null,8,["parent-item","show-library-only-filter","title","path"])):i("",!0),I,e.value?(a(),o(m,{key:1,itemtype:"trackversions","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-track-number":!1,"load-items":u,"show-refresh-button":!1,"sort-keys":["name","sort_name","duration"],title:t.$t("other_versions"),"hide-on-empty":!0,path:t.provider+t.itemId,"allow-collapse":!0},null,8,["parent-item","title","path"])):i("",!0),g,e.value?(a(),o(v,{key:2,"item-details":e.value},null,8,["item-details"])):i("",!0),T]))}});export{Z as default};
