import{I as d}from"./ItemsListing-d367002d.js";import{I as h,_ as k}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-7a08d984.js";import{d as w,r as I,N as g,c as a,g as V,f as A,e as o,u as B,j as l,i as s,b as i}from"./index-5e5d70f8.js";import{M as D}from"./MediaItemImages-2805d4e0.js";import"./VCheckbox-e50bb5e3.js";import"./eventbus-5e9bd59e.js";import"./VListItem-a276ed14.js";import"./VCheckboxBtn-d41d6adf.js";import"./VList-1bffb8df.js";import"./VCardText-bdfad4e5.js";import"./VCard-35632c3b.js";import"./VMenu-4ca080f5.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./ListItem-f9f543a5.js";import"./Button-558e640e.js";import"./VSpacer-3df5a092.js";/* empty css              */import"./PanelviewItemCompact-5dcada9d.js";import"./VAlert-8c135db5.js";import"./Container-39ff39e9.js";import"./Toolbar-9ec9e26d.js";import"./VToolbar-c09ee689.js";import"./VTextField-fa7e9a48.js";import"./VInfiniteScroll-01a7fa67.js";import"./layout-41b62dfb.js";import"./VVirtualScroll-a35573be.js";import"./VDialog-8fad6ca7.js";const N=s("br",null,null,-1),C=s("br",null,null,-1),$=s("br",null,null,-1),M=s("br",null,null,-1),oe=w({__name:"AlbumDetails",props:{itemId:{},provider:{}},setup(v){const r=v,e=I(),c=async function(){e.value=await i.getAlbum(r.itemId,r.provider)};g(()=>r.itemId,t=>{t&&c()},{immediate:!0});const f=async function(t){return await i.getAlbumTracks(r.itemId,r.provider,t.libraryOnly)},y=async function(t){return await i.getAlbumVersions(e.value.item_id,e.value.provider)},b=async function(){e.value&&(e.value=await i.sendCommand("music/albums/update",{item_id:e.value.item_id,update:e.value,overwrite:!0}))};return(t,m)=>{var n,u,p;return a(),V("section",null,[A(h,{item:e.value,"active-provider":t.provider},null,8,["item","active-provider"]),e.value?(a(),o(d,{key:0,itemtype:"albumtracks","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!0,"show-library-only-filter":e.value.provider=="library"&&B(i).hasStreamingProviders.value,"show-refresh-button":!1,"load-items":f,"sort-keys":["track_number","name","sort_name","duration","duration_desc"],title:t.$t("tracks")},null,8,["parent-item","show-library-only-filter","title"])):l("",!0),N,e.value?(a(),o(d,{key:1,itemtype:"albumversions","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-refresh-button":!1,"load-items":y,"sort-keys":["provider","name","year"],title:t.$t("other_versions"),"hide-on-empty":!0},null,8,["parent-item","title"])):l("",!0),C,((n=e.value)==null?void 0:n.provider)=="library"&&((p=(u=e.value)==null?void 0:u.metadata)!=null&&p.images)?(a(),o(D,{key:2,modelValue:e.value.metadata.images,"onUpdate:modelValue":[m[0]||(m[0]=_=>e.value.metadata.images=_),b]},null,8,["modelValue"])):l("",!0),$,e.value?(a(),o(k,{key:3,"item-details":e.value},null,8,["item-details"])):l("",!0),M])}}});export{oe as default};
