import{I as u}from"./ItemsListing-BP5XXmLQ.js";import{I as c,_ as f}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CPN1bhCQ.js";import{aw as y,J as k,L as w,ax as b,ay as o,o as h,aG as s,az as n,E as m,aB as I,aN as l}from"./index-Dj6UKNsX.js";import"./Container-D5KFPVjs.js";import"./index-kQIztB-E.js";import"./Toolbar-B32L_M7G.js";import"./VToolbar-w3YLtQh8.js";import"./Button-faGxxowY.js";import"./ListItem-DXTT8_G5.js";import"./userPreferences-CpcwN_LW.js";import"./VCheckboxBtn-B5wUW3kZ.js";import"./VSelectionControl-CCjz0Lnv.js";import"./MediaItemThumb-DYAHQAuC.js";import"./PanelviewItemCompact-BKBJxxoM.js";import"./VInfiniteScroll-DataCA15.js";import"./VVirtualScroll-Cg5AQGzG.js";import"./VAlert-CFvRz3gu.js";import"./marquee_text_sync-R3hHMfp7.js";import"./VDialog-5KHkpnhE.js";const j=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)};w(()=>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(),b("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{j as default};
