import{I as n}from"./ItemsListing-BNF8UGX2.js";import{I as f,_ as c}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-_xknhQg7.js";import{x as y,r as k,w,D as b,l as h,y as l,J as s,B as m,G as I,I as i,z as a}from"./index-DKhfhZyI.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_cee6bfa4_lang-BEm2OpTr.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-C_Zsg23g.js";import"./VListItem-DG7fZYqG.js";import"./VMenu-BTA9m0lg.js";import"./VCard-AQsAsy9j.js";import"./VCardText-PK-MK26S.js";import"./VList-BsIdJYb-.js";import"./VChip-Bt-2eXUN.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./eventbus-CGRXT3Tn.js";import"./ListItem-hgXNSQeh.js";import"./VCheckbox-w4Dp7feX.js";import"./VCheckboxBtn-SjULh2vZ.js";import"./PanelviewItemCompact-BXu7orP5.js";import"./VSpacer-lTIuHyc5.js";/* empty css              */import"./Container-DdZvDMit.js";import"./VContainer-bkYdVay1.js";import"./Toolbar-DfTAf723.js";import"./VToolbar-Be3D-k7i.js";import"./VTextField-C_1U2QFr.js";import"./VInfiniteScroll-s1qKdTFY.js";import"./layout-MVvGEKAO.js";import"./VRow-C3_3R0pl.js";import"./VVirtualScroll-DrLqMq8M.js";import"./VAlert-EFQTLSCo.js";import"./marquee_text_sync-z5rF38HK.js";import"./VDialog-zzdXdu7l.js";const x=y({__name:"TrackDetails",props:{itemId:{},provider:{},album:{}},setup(p){const t=p,r=k(),u=async function(){r.value=await i.getTrack(t.itemId,t.provider,t.album)};w(()=>t.itemId,e=>{e&&u()},{immediate:!0});const d=async function(e){return await i.getTrackVersions(r.value.item_id,r.value.provider)},v=async function(e){return await i.getTrackAlbums(t.itemId,t.provider,e.libraryOnly)};return(e,o)=>(a(),b("section",null,[h(f,{item:r.value,"active-provider":e.provider},null,8,["item","active-provider"]),r.value?(a(),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(i).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?(a(),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?(a(),l(c,{key:2,"item-details":r.value},null,8,["item-details"])):s("",!0),o[2]||(o[2]=m("br",null,null,-1))]))}});export{x as default};
