import{I as n}from"./ItemsListing-BHlkb6-j.js";import{I as f,_ as c}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-bItMFJVo.js";import{d as y,i as k,ad as b,c as w,o,b as h,e as l,q as s,a as m,u as I,m as i}from"./index-LFx1jIjH.js";import"./Container-CuH2YNr5.js";import"./Button-SUce42c3.js";import"./VBtn-BYKkZzw0.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VContainer-or1Uze2V.js";/* empty css              */import"./Toolbar-iQxHKI_C.js";import"./VToolbar-Dc2WDt1C.js";import"./ListItem-DhvO1M3C.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-B4veTxLS.js";import"./VInput-B3Z2GK8Z.js";import"./MediaItemThumb-cYqdWFcl.js";import"./PanelviewItemCompact-Bf82DAtE.js";import"./VSpacer-Cg-cZSyv.js";import"./VTextField-DyzwZgKh.js";import"./VInfiniteScroll-DH2IK80_.js";import"./layout-C6GuZOkj.js";import"./VRow-cyJLSUM5.js";import"./VVirtualScroll-DYZmdOFl.js";import"./VAlert-Cyb25ra3.js";import"./marquee_text_sync-AxiznPti.js";import"./VDialog-zNF2U_x9.js";const R=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)};b(()=>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,a)=>(o(),w("section",null,[h(f,{item:r.value,"active-provider":e.provider},null,8,["item","active-provider"]),r.value?(o(),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),a[0]||(a[0]=m("br",null,null,-1)),r.value?(o(),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),a[1]||(a[1]=m("br",null,null,-1)),r.value?(o(),l(c,{key:2,"item-details":r.value},null,8,["item-details"])):s("",!0),a[2]||(a[2]=m("br",null,null,-1))]))}});export{R as default};
