import{I as l}from"./ItemsListing-9a3a53ae.js";import{I as c,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-a5edd4c3.js";import{d as f,r as y,L as b,c as i,g as h,f as _,e as o,u as k,j as a,i as m,b as s,ar as w}from"./index-9299e1c1.js";import"./VCheckbox-75b4c12a.js";import"./eventbus-fb52ce0b.js";import"./VListItem-748fc7af.js";import"./VCheckboxBtn-ad9d405a.js";import"./VList-6d58de6a.js";import"./VCardText-7bb4efb6.js";import"./VCard-6d87d169.js";import"./VMenu-02b91385.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./ListItem-50af6ebb.js";import"./Button-784539f4.js";import"./VSpacer-caa12be4.js";/* empty css              */import"./PanelviewItemCompact-c5d1faef.js";import"./VAlert-708f5408.js";import"./Container-ff473259.js";import"./Toolbar-eb89f7db.js";import"./VToolbar-2949cae0.js";import"./VTextField-9151d790.js";import"./VInfiniteScroll-dfad6ac1.js";import"./layout-0bba43de.js";import"./VVirtualScroll-1c00b40c.js";import"./VDialog-bec8ba32.js";const g=m("br",null,null,-1),I=m("br",null,null,-1),Y=f({__name:"AlbumDetails",props:{itemId:{},provider:{}},setup(n){const r=n,e=y(),p=async function(){e.value=await s.getAlbum(r.itemId,r.provider)};b(()=>r.itemId,t=>{t&&p()},{immediate:!0});const u=async function(t){return await s.getAlbumTracks(r.itemId,r.provider,t.libraryOnly)},d=async function(t){return await s.getAlbumVersions(e.value.item_id,e.value.provider)};return(t,A)=>(i(),h("section",null,[_(c,{item:e.value,"active-provider":t.provider},null,8,["item","active-provider"]),e.value?(i(),o(l,{key:0,itemtype:"albumtracks","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!0,"show-library-only-filter":e.value.provider=="library"&&k(w)(e.value).length>0,"show-refresh-button":!1,"load-items":u,"sort-keys":["track_number","name","sort_name","duration","duration_desc"],title:t.$t("tracks")},null,8,["parent-item","show-library-only-filter","title"])):a("",!0),g,e.value?(i(),o(l,{key:1,itemtype:"albumversions","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-refresh-button":!1,"load-items":d,"sort-keys":["provider","name","year"],title:t.$t("other_versions"),"hide-on-empty":!0},null,8,["parent-item","title"])):a("",!0),I,e.value?(i(),o(v,{key:2,"item-details":e.value},null,8,["item-details"])):a("",!0)]))}});export{Y as default};
