import{I as n}from"./ItemsListing-HGPehT6Y.js";import{I as f,_ as c}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-D2T05i8T.js";import{d as y,r as k,H as b,c as i,h,f as w,e as l,u as I,j as s,g as m,b as a}from"./index-BcUYXcPq.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_85c6bb69_lang-CQtpREte.js";import"./ProviderIcon.vue_vue_type_script_setup_true_lang-B54PMsCQ.js";import"./VListItem-DC0X47Q4.js";import"./VCheckboxBtn-DvMOQpng.js";import"./VList-BKlimdrv.js";import"./VCardText-D-aWL0fz.js";import"./VCard-Dx-t9yLE.js";import"./VMenu-7bd_kTRb.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./eventbus-CGRXT3Tn.js";import"./ListItem-Cq4V-Lz8.js";import"./Button-70QbWoUa.js";import"./VCheckbox-BEPbmvTc.js";import"./VSpacer-G9Q32ju2.js";/* empty css              */import"./PanelviewItemCompact-w04R_lVh.js";import"./VAlert-DbYDqcUs.js";import"./Container-BixSAZes.js";import"./VContainer-CoH7hbKx.js";import"./Toolbar-CtV0cu85.js";import"./VToolbar-B-HEXsGH.js";import"./VTextField-rtqk6KCF.js";import"./VInfiniteScroll-BVPAk5NO.js";import"./layout-B1VfN3Kd.js";import"./VRow-CBTscIT0.js";import"./VVirtualScroll-BfIwRbDJ.js";import"./VDialog-Bj6h5fTK.js";const Z=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)};b(()=>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(),h("section",null,[w(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{Z as default};
