import{I as m}from"./ItemsListing-a3071fce.js";import{I as c,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-dba9e921.js";import{d as f,r as h,N as y,c as a,g as k,f as b,e as i,u as w,j as s,i as l,b as o}from"./index-e6082f30.js";import"./VCheckbox-a10abf59.js";import"./eventbus-1e2da4c1.js";import"./VListItem-91fe3ba6.js";import"./VCheckboxBtn-eb419bf7.js";import"./VList-80c1fded.js";import"./VCardText-67a28cbe.js";import"./VCard-745d9fc1.js";import"./VMenu-909c4fbd.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./ListItem-522ad704.js";import"./Button-45ebc60e.js";import"./VSpacer-dd486a02.js";/* empty css              */import"./PanelviewItemCompact-55d2a2a0.js";import"./VAlert-161b165a.js";import"./Container-ae5e8bd5.js";import"./Toolbar-3c56accd.js";import"./VToolbar-d7a3a303.js";import"./VTextField-a74cff9a.js";import"./VInfiniteScroll-5323e13a.js";import"./layout-385ffd2e.js";import"./VVirtualScroll-625c3835.js";import"./VDialog-72578355.js";const _=l("br",null,null,-1),I=l("br",null,null,-1),g=l("br",null,null,-1),Y=f({__name:"TrackDetails",props:{itemId:{},provider:{},album:{}},setup(n){const r=n,t=h(),p=async function(){t.value=await o.getTrack(r.itemId,r.provider,r.album)};y(()=>r.itemId,e=>{e&&p()},{immediate:!0});const u=async function(e){return await o.getTrackVersions(t.value.item_id,t.value.provider)},d=async function(e){return await o.getTrackAlbums(r.itemId,r.provider,e.libraryOnly)};return(e,T)=>(a(),k("section",null,[b(c,{item:t.value,"active-provider":e.provider},null,8,["item","active-provider"]),t.value?(a(),i(m,{key:0,itemtype:"trackalbums","parent-item":t.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-library-only-filter":t.value.provider=="library"&&w(o).hasStreamingProviders.value,"show-track-number":!1,"show-refresh-button":!1,"load-items":d,"sort-keys":["name","sort_name","year","year_desc"],title:e.$t("appears_on"),path:e.provider+e.itemId,"allow-collapse":!0},null,8,["parent-item","show-library-only-filter","title","path"])):s("",!0),_,t.value?(a(),i(m,{key:1,itemtype:"trackversions","parent-item":t.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:e.$t("other_versions"),"hide-on-empty":!0,path:e.provider+e.itemId,"allow-collapse":!0},null,8,["parent-item","title","path"])):s("",!0),I,t.value?(a(),i(v,{key:2,"item-details":t.value},null,8,["item-details"])):s("",!0),g]))}});export{Y as default};
