import{I as m}from"./ItemsListing-52fc3de5.js";import{I as c,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-a2e0c1f9.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-af8b7753.js";import{m as _}from"./VCheckbox-e055872e.js";import"./eventbus-3080c6de.js";import"./VListItem-0186c915.js";import"./ListItem-6ec3b906.js";import"./Button-b1542585.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./VMenu-cf6ae0bc.js";import"./VCard-4405819f.js";import"./VCardText-b2843211.js";import"./VSpacer-a83ddbc5.js";/* empty css              */import"./PanelviewItemCompact-70a213fe.js";import"./VAlert-e27964fd.js";import"./Container-736465bf.js";import"./Toolbar-cce034aa.js";import"./VList-92308f1a.js";import"./VToolbar-99429184.js";import"./VTextField-be93763f.js";import"./VCheckboxBtn-77b0c8cb.js";import"./VInfiniteScroll-c6eeb0a7.js";import"./layout-db5fa092.js";import"./VVirtualScroll-4c0c507a.js";import"./VDialog-0dc5f298.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};
