import{I as p}from"./ItemsListing-ByrUsYKd.js";import{I as c,_ as f}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-Chq_R5dV.js";import{d as y,r as k,ae as b,c as h,b as w,h as s,e as m,a as n,u as I,v as o,o as l}from"./index-CD7iYaFT.js";import"./Container-ClW3AMEw.js";import"./index-CBho6rsP.js";import"./VContainer-DFqPxZ0T.js";/* empty css              */import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-B7AWyK9d.js";import"./VToolbar-BQejIjUR.js";import"./VBtn-B0XatuYF.js";import"./Button-BUjpiwEZ.js";import"./ListItem-C-HNqEeC.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-Dl2aFjrE.js";import"./VInput-DDFZ8lhb.js";import"./MediaItemThumb-BVMzVj0K.js";import"./PanelviewItemCompact-DmP5jPAL.js";import"./VSpacer-B8t0Vh55.js";import"./VTextField-CVfOZKc3.js";import"./VInfiniteScroll-DHXPR3PY.js";import"./layout-BCm0QQDS.js";import"./VRow-DFe5cA7D.js";import"./VVirtualScroll-BREm3RjH.js";import"./VAlert-cuze2JsR.js";import"./marquee_text_sync-gz0T_gx6.js";import"./VDialog-3VB6G7S5.js";const U=y({__name:"TrackDetails",props:{itemId:{},provider:{},album:{}},setup(r){const a=r,e=k(),u=async function(){e.value=await o.getTrack(a.itemId,a.provider,a.album)};b(()=>a.itemId,t=>{t&&u()},{immediate:!0});const d=async function(t){return await o.getTrackVersions(e.value.item_id,e.value.provider)},v=async function(t){return await o.getTrackAlbums(a.itemId,a.provider,t.libraryOnly)};return(t,i)=>(l(),h("section",null,[w(c,{item:e.value,"active-provider":r.provider},null,8,["item","active-provider"]),e.value?(l(),s(p,{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(o).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"])):m("",!0),i[0]||(i[0]=n("br",null,null,-1)),e.value?(l(),s(p,{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"])):m("",!0),i[1]||(i[1]=n("br",null,null,-1)),e.value?(l(),s(f,{key:2,"item-details":e.value},null,8,["item-details"])):m("",!0),i[2]||(i[2]=n("br",null,null,-1))]))}});export{U as default};
