import{I as m}from"./ItemsListing-fd7f4f42.js";import{I as c,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-961c80c2.js";import{d as f,r as h,N as y,c as a,g as k,f as b,e as o,u as w,j as i,i as l,b as s}from"./index-dce39766.js";import{m as _}from"./VCheckbox-78b5eb27.js";import"./eventbus-e4769370.js";import"./VListItem-e4ea868c.js";import"./ListItem-0ba65b1e.js";import"./Button-222bb89d.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./VMenu-2f81965b.js";import"./VCard-56599f1a.js";import"./VCardText-499c042a.js";import"./VSpacer-362d86d1.js";/* empty css              */import"./PanelviewItemCompact-1828c58a.js";import"./VAlert-406dcdf2.js";import"./Container-b77335fb.js";import"./Toolbar-0a1c192e.js";import"./VList-04768c49.js";import"./VToolbar-2cbe0a6f.js";import"./VTextField-57d20f88.js";import"./VCheckboxBtn-ee4d01ee.js";import"./VInfiniteScroll-57f099b2.js";import"./layout-9d53f89f.js";import"./VVirtualScroll-0a365e7c.js";import"./VDialog-1b168444.js";const I=l("br",null,null,-1),g=l("br",null,null,-1),T=l("br",null,null,-1),Z=f({__name:"TrackDetails",props:{itemId:{},provider:{},album:{}},setup(n){const r=n,e=h(),p=async function(){e.value=await s.getTrack(r.itemId,r.provider,r.album)};y(()=>r.itemId,t=>{t&&p()},{immediate:!0});const u=async function(t){return await s.getTrackVersions(e.value.item_id,e.value.provider)},d=async function(t){return await s.getTrackAlbums(r.itemId,r.provider,t.libraryOnly)};return(t,V)=>(a(),k("section",null,[b(c,{item:e.value,"active-provider":t.provider},null,8,["item","active-provider"]),e.value?(a(),o(m,{key:0,itemtype:"trackalbums","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-library-only-filter":e.value.provider=="library"&&w(_)(e.value).length>0,"show-track-number":!1,"show-refresh-button":!1,"load-items":d,"sort-keys":["name","sort_name","year","year_desc"],title:t.$t("appears_on"),path:t.provider+t.itemId,"allow-collapse":!0},null,8,["parent-item","show-library-only-filter","title","path"])):i("",!0),I,e.value?(a(),o(m,{key:1,itemtype:"trackversions","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-track-number":!1,"load-items":u,"show-refresh-button":!1,"sort-keys":["name","sort_name","duration"],title:t.$t("other_versions"),"hide-on-empty":!0,path:t.provider+t.itemId,"allow-collapse":!0},null,8,["parent-item","title","path"])):i("",!0),g,e.value?(a(),o(v,{key:2,"item-details":e.value},null,8,["item-details"])):i("",!0),T]))}});export{Z as default};
