import{I as m}from"./ItemsListing-CHZs9N6z.js";import{a7 as p,F as r,a6 as i,L as c,ap as o,aN as d,N as b,ai as y,a9 as _}from"./index-CFcIX8RO.js";import"./Container-iGBsqgnx.js";import"./index-kQIztB-E.js";import"./Toolbar-DambSy-S.js";import"./VToolbar-B_3_MVxk.js";import"./Button-IxLZkOI0.js";import"./ListItem-CWPLlf7K.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-CGTv89Z9.js";import"./VCheckboxBtn-Dy9mjR59.js";import"./MediaItemThumb-oOnMmU-2.js";import"./PanelviewItemCompact-YHP34gKS.js";import"./VInfiniteScroll-DY-7nfIB.js";import"./VVirtualScroll-BRrQ8Y7O.js";import"./VAlert-DZurr_D6.js";const N=p({name:"Albums",__name:"LibraryAlbums",setup(f){const e=r(!1),a=r(i.libraryAlbumsCount),l=["name","name_desc","sort_name","sort_name_desc","year","year_desc","timestamp_added","timestamp_added_desc","last_played","last_played_desc","play_count","play_count_desc","artist_name","artist_name_desc"];c(()=>{const t=o.subscribe(d.MEDIA_ITEM_ADDED,s=>{s.object_id?.startsWith("library://artist")&&(e.value=!0)});b(t)});const n=async function(t){return e.value=!1,u(t),await o.getLibraryAlbums(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy,t.albumType)},u=async function(t){if(!t.favoritesOnly&&!t.albumType){a.value=i.libraryAlbumsCount;return}a.value=await o.getLibraryAlbumsCount(t.favoritesOnly||void 0,t.albumType||void 0)};return(t,s)=>(_(),y(m,{itemtype:"albums",path:"libraryalbums","show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":n,"sort-keys":l,"update-available":e.value,title:t.$t("albums"),"allow-key-hooks":!0,"show-search-button":!0,icon:"mdi-album","restore-state":!0,total:a.value,"show-album-type-filter":!0},null,8,["update-available","title","total"]))}});export{N as default};
