import{I as n}from"./ItemsListing-BGUL9QyB.js";import{I as f,_ as c}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-Bf7qdK33.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-CFvoaD7J.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_4409cede_lang-41DbVClm.js";import"./ProviderIcon.vue_vue_type_script_setup_true_lang-Ji67J6Pu.js";import"./VListItem-CSPID7yq.js";import"./VChip-Ccz1-bmn.js";import"./VList-fGk9SRdf.js";import"./VCardText-CpOuj25H.js";import"./VCard-DxLPF-Ra.js";import"./VMenu-9pSrU4Fo.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./eventbus-CGRXT3Tn.js";import"./ListItem-nYGtvGaY.js";import"./VCheckbox-B5r7QKHZ.js";import"./VCheckboxBtn-CRgZyCzV.js";import"./VTooltip-DC73AT2B.js";import"./VSpacer-UYEiyhN7.js";/* empty css              */import"./PanelviewItemCompact-BQIsDE0n.js";import"./Container-BDz3QMuX.js";import"./VContainer-CzfHAKpA.js";import"./Toolbar-DNen7a-V.js";import"./VToolbar-Da4d1W_R.js";import"./VTextField-DF4u_eMy.js";import"./VInfiniteScroll-D1yVLjQf.js";import"./layout-BeGdxe2Y.js";import"./VRow-BC1No8oB.js";import"./VVirtualScroll-BDBVEoUv.js";import"./VAlert-CIiIOQza.js";import"./marquee_text_sync-k18A2BIX.js";import"./VDialog-CdvGeqlS.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};
