import{I as n}from"./ItemsListing-BwjD1tmq.js";import{I as f,_ as c}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-B-vwm4W9.js";import{d as y,r as k,K as b,c as o,h,f as w,e as l,u as I,j as s,g as m,b as i}from"./index-CLKg64ON.js";import"./VCheckbox-CpTv3BhW.js";import"./eventbus-D-xzWv8v.js";import"./VListItem-B_TSjQ1y.js";import"./VCheckboxBtn-DXJHHMHd.js";import"./VList-BvG6-yh2.js";import"./VCardText-BAUfdzDA.js";import"./VCard-BaRPabiE.js";import"./VMenu-CLSWQG_U.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-f79Nhqh7.js";import"./Button-F8l3l_P8.js";import"./VSpacer-CqqJVVs3.js";/* empty css              */import"./PanelviewItemCompact-CM48-dMH.js";import"./VAlert-CCGDAWu2.js";import"./Container-ZPskS02H.js";import"./Toolbar-BaIn3BvJ.js";import"./VToolbar-DSn0RyUD.js";import"./VTextField-C1QkMZRy.js";import"./VInfiniteScroll-pn5EaZ8a.js";import"./layout-CYdR31l5.js";import"./VVirtualScroll-DKBgr9yN.js";import"./VDialog-BpGrcp5y.js";const U=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(),h("section",null,[w(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{U as default};
