import{l as d,J as f,r as i,B as m,O as r,S as v,b as n,o as y,af as s,q as E,v as D}from"./index-a5bb9833.js";import{_ as M}from"./ItemsListing.vue_vue_type_script_setup_true_lang-83c47556.js";import"./ListviewItem-e2342ce8.js";import"./MediaItemThumb.vue_vue_type_style_index_0_lang-a35ce75a.js";import"./VMenu-240a4406.js";import"./VDivider-df9414f0.js";import"./VBtn-629f5316.js";import"./VListItem-39677d21.js";import"./Container-4773c160.js";/* empty css              */import"./VDialog-667c0916.js";import"./VCard-04ae357c.js";import"./VToolbar-b79315e8.js";import"./VSelect-4d69c543.js";/* empty css                             */import"./PanelviewItem.vue_vue_type_style_index_0_lang-d218249a.js";import"./Alert-a5ce795e.js";import"./VBadge-f7d58168.js";import"./VRow-7d86481a.js";const z=d({__name:"LibraryAlbums",setup(A){const{t:p}=f(),l=i([]),o=i(!1);m.topBarContextMenuItems=[{label:"sync_now",labelArgs:[p("albums")],action:()=>{r.startSync([v.ALBUM])},icon:"mdi-sync"}],n(()=>{m.topBarContextMenuItems=[]}),y(()=>{const t=r.subscribe_multi([s.MEDIA_ITEM_ADDED,s.MEDIA_ITEM_UPDATED,s.MEDIA_ITEM_DELETED],a=>{var e;(e=a.object_id)!=null&&e.startsWith("library://artist")&&(o.value=!0)});n(t)});const u=async function(t,a,e,c,_=!0){const b=_||void 0;return o.value=!1,await r.getLibraryAlbums(b,c,a,t,e)};return(t,a)=>(E(),D(M,{itemtype:"albums",items:l.value,"show-provider":!1,"show-favorites-only-filter":!0,"load-data":u,"sort-keys":["sort_name","timestamp_added DESC","sort_artist","year"],"update-available":o.value},null,8,["items","update-available"]))}});export{z as default};
