import{I as l}from"./ItemsListing-7bf0c0b0.js";import{I as c,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-30261e03.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 m,b as s}from"./index-103db515.js";import{m as _}from"./VCheckbox-ddd5d7c4.js";import"./eventbus-6e1536e2.js";import"./VListItem-ab7a82e2.js";import"./ListItem-91f42136.js";import"./Button-412f73ce.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./VMenu-482e7fbc.js";import"./VCard-d4f085fd.js";import"./VCardText-1a59cac1.js";import"./VSpacer-adcb10ea.js";/* empty css              */import"./PanelviewItemCompact-5ede3757.js";import"./VAlert-4165d2e6.js";import"./Container-d98651c4.js";import"./Toolbar-908bc969.js";import"./VList-cac73f62.js";import"./VToolbar-dcf67568.js";import"./VTextField-73438668.js";import"./VCheckboxBtn-19bafbc9.js";import"./VInfiniteScroll-c2610a44.js";import"./layout-e7ad5131.js";import"./VVirtualScroll-b23fb9a8.js";import"./VDialog-08f8879f.js";const I=m("br",null,null,-1),g=m("br",null,null,-1),Y=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,T)=>(a(),k("section",null,[b(c,{item:e.value,"active-provider":t.provider},null,8,["item","active-provider"]),e.value?(a(),o(l,{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(l,{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)]))}});export{Y as default};
