import{l as d,J as f,r as i,B as m,O as r,U as v,b as n,o as y,af as s,q as E,v as D}from"./index-e9211ef1.js";import{_ as M}from"./ItemsListing.vue_vue_type_script_setup_true_lang-436cf3d3.js";import"./ListviewItem-b7a4258b.js";import"./MediaItemThumb.vue_vue_type_style_index_0_lang-278977b5.js";import"./VMenu-bc0cce60.js";import"./VDivider-336c24cd.js";import"./VBtn-68784d55.js";import"./VListItem-230d1393.js";import"./Container-349a0ac0.js";/* empty css              */import"./VDialog-5f240a62.js";import"./VCard-138864fc.js";import"./VToolbar-daf2b89f.js";import"./VSelect-04a129eb.js";/* empty css                             */import"./PanelviewItem.vue_vue_type_style_index_0_lang-fefd2afe.js";import"./Alert-55091fd0.js";import"./VSpacer-bdf2f653.js";import"./VBadge-9fa94f29.js";import"./VRow-e8f3e51e.js";const F=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{F as default};
