import{I as n}from"./ItemsListing-Cd5IBPUO.js";import{I as f,_ as c}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-wa_5O_h6.js";import{x as y,r as k,w,y as i,D as b,n as h,z as l,G as I,K as s,B as m,I as a}from"./index-DuDRe8hE.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_ea20d839_lang-Cfo9s-Sj.js";import"./ProviderIcon.vue_vue_type_script_setup_true_lang-CHFYJo9W.js";import"./VListItem-CuoSvcqW.js";import"./VChip-BRQkwjNJ.js";import"./VList-BlpguAX2.js";import"./VCardText-Dn8Yf3BC.js";import"./VCard-Cf5RelEw.js";import"./VMenu-B49kEbTj.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./eventbus-CGRXT3Tn.js";import"./ListItem-xrpNnThP.js";import"./VCheckbox-DBOdVsut.js";import"./VCheckboxBtn-CMIUd74V.js";import"./VTooltip-aHjUkPs6.js";import"./VSpacer-CYzCqmAo.js";/* empty css              */import"./PanelviewItemCompact-BQvk3oJ_.js";import"./Container-CQhyPPl2.js";import"./VContainer-CCoTeKDA.js";import"./Toolbar-CibNv11m.js";import"./VToolbar-Dhcm-C4i.js";import"./VTextField-D5EFKWzi.js";import"./VInfiniteScroll-BaRPR-8K.js";import"./layout-qserhqCM.js";import"./VRow-C-co90yO.js";import"./VVirtualScroll-CdwGYB7u.js";import"./VAlert-sqJ4UeFM.js";import"./marquee_text_sync-DCD_29QD.js";import"./VDialog-BsvLwk-0.js";const ee=y({__name:"TrackDetails",props:{itemId:{},provider:{},album:{}},setup(p){const t=p,r=k(),u=async function(){r.value=await a.getTrack(t.itemId,t.provider,t.album)};w(()=>t.itemId,e=>{e&&u()},{immediate:!0});const d=async function(e){return await a.getTrackVersions(r.value.item_id,r.value.provider)},v=async function(e){return await a.getTrackAlbums(t.itemId,t.provider,e.libraryOnly)};return(e,o)=>(i(),b("section",null,[h(f,{item:r.value,"active-provider":e.provider},null,8,["item","active-provider"]),r.value?(i(),l(n,{key:0,itemtype:"trackalbums","parent-item":r.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-library-only-filter":r.value.provider=="library"&&I(a).hasStreamingProviders.value,"show-track-number":!1,"show-refresh-button":!1,"load-items":v,"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),o[0]||(o[0]=m("br",null,null,-1)),r.value?(i(),l(n,{key:1,itemtype:"trackversions","parent-item":r.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:e.$t("other_versions"),"hide-on-empty":!0,path:e.provider+e.itemId,"allow-collapse":!0},null,8,["parent-item","title","path"])):s("",!0),o[1]||(o[1]=m("br",null,null,-1)),r.value?(i(),l(c,{key:2,"item-details":r.value},null,8,["item-details"])):s("",!0),o[2]||(o[2]=m("br",null,null,-1))]))}});export{ee as default};
