import{I as m}from"./ItemsListing-a9f20f21.js";import{I as c,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-42f1ae0c.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-f6d6d5f3.js";import{m as _}from"./VCheckbox-a96acb8a.js";import"./eventbus-72e8654e.js";import"./VListItem-79e9844f.js";import"./ListItem-3a57b472.js";import"./Button-0a6e461b.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./VMenu-5246b81b.js";import"./VCard-0040a03b.js";import"./VCardText-b34629f4.js";import"./VSpacer-c4203efd.js";/* empty css              */import"./PanelviewItemCompact-bd25855a.js";import"./VAlert-70136757.js";import"./Container-2a9ded95.js";import"./Toolbar-4dbf8f22.js";import"./VList-bf612667.js";import"./VToolbar-0d490162.js";import"./VTextField-c45341d1.js";import"./VCheckboxBtn-c1335d51.js";import"./VInfiniteScroll-be8bacb0.js";import"./layout-f68308bb.js";import"./VVirtualScroll-bf2c7c27.js";import"./VDialog-0f04a475.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};
