import{I as u}from"./ItemsListing-D_KqSTZS.js";import{I as c,_ as f}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-B_OXjTPr.js";import{ay as y,J as k,L as b,az as w,aA as o,o as h,aI as s,aB as n,E as m,aD as I,aP as l}from"./index-BRUnowC8.js";import"./Container-ZHtGcXZO.js";import"./index-kQIztB-E.js";import"./Toolbar-BEJzY0mB.js";import"./VToolbar-DS4mUdOC.js";import"./Button-BKv4xLAv.js";import"./ListItem-jfbxOrad.js";import"./userPreferences-DBWZCHKf.js";import"./VCheckboxBtn-D390s4L9.js";import"./VSelectionControl-Co1cRcmS.js";import"./MediaItemThumb-CIE9_Elw.js";import"./PanelviewItemCompact-CsJmi5IT.js";import"./VInfiniteScroll-BORsRMGl.js";import"./VVirtualScroll-htzu2YXu.js";import"./VAlert-DQxypmdN.js";import"./marquee_text_sync-BajKmu-m.js";import"./VDialog-Bh3mGVOy.js";const x=y({__name:"TrackDetails",props:{itemId:{},provider:{},album:{}},setup(r){const a=r,e=k(),p=async function(){e.value=await l.getTrack(a.itemId,a.provider,a.album)};b(()=>a.itemId,t=>{t&&p()},{immediate:!0});const d=async function(t){return await l.getTrackVersions(e.value.item_id,e.value.provider)},v=async function(t){return await l.getTrackAlbums(a.itemId,a.provider,t.libraryOnly)};return(t,i)=>(o(),w("section",null,[h(c,{item:e.value,"active-provider":r.provider},null,8,["item","active-provider"]),e.value?(o(),s(u,{key:0,itemtype:"trackalbums","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-library-only-filter":e.value.provider=="library"&&I(l).hasStreamingProviders.value,"show-track-number":!1,"show-refresh-button":!1,"load-items":v,"sort-keys":["name","sort_name","year","year_desc"],title:t.$t("appears_on"),path:r.provider+r.itemId,"allow-collapse":!0},null,8,["parent-item","show-library-only-filter","title","path"])):n("",!0),i[0]||(i[0]=m("br",null,null,-1)),e.value?(o(),s(u,{key:1,itemtype:"trackversions","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-track-number":!1,"load-items":d,"show-refresh-button":!1,"sort-keys":["name","sort_name","duration"],title:t.$t("other_versions"),"hide-on-empty":!0,path:r.provider+r.itemId,"allow-collapse":!0},null,8,["parent-item","title","path"])):n("",!0),i[1]||(i[1]=m("br",null,null,-1)),e.value?(o(),s(f,{key:2,"item-details":e.value},null,8,["item-details"])):n("",!0),i[2]||(i[2]=m("br",null,null,-1))]))}});export{x as default};
