import{I as m}from"./ItemsListing-d367002d.js";import{I as c,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-7a08d984.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-5e5d70f8.js";import"./VCheckbox-e50bb5e3.js";import"./eventbus-5e9bd59e.js";import"./VListItem-a276ed14.js";import"./VCheckboxBtn-d41d6adf.js";import"./VList-1bffb8df.js";import"./VCardText-bdfad4e5.js";import"./VCard-35632c3b.js";import"./VMenu-4ca080f5.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./ListItem-f9f543a5.js";import"./Button-558e640e.js";import"./VSpacer-3df5a092.js";/* empty css              */import"./PanelviewItemCompact-5dcada9d.js";import"./VAlert-8c135db5.js";import"./Container-39ff39e9.js";import"./Toolbar-9ec9e26d.js";import"./VToolbar-c09ee689.js";import"./VTextField-fa7e9a48.js";import"./VInfiniteScroll-01a7fa67.js";import"./layout-41b62dfb.js";import"./VVirtualScroll-a35573be.js";import"./VDialog-8fad6ca7.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};
