import{I as d}from"./ItemsListing-B3ZtAJWO.js";import{s,f as r,E as m}from"./index-z-_EAweb.js";import{d as p,r as a,o as c,a0 as y,D as b,u as f,aC as v,e as _}from"./lucide-zv3GGi29.js";import"./Container-B_lXrId2.js";import"./index-kQIztB-E.js";import"./vuetify-B3hdaDeh.js";import"./Toolbar-C74mjsWs.js";import"./userPreferences-ChS7k7ED.js";import"./vue-router-iwtG8Mvn.js";import"./Button-B_PDPMfe.js";import"./ListItem-BumkOg81.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-Dz8hl1BT.js";import"./MediaItemThumb-DZR1OdAd.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-Dm-KWPd5.js";import"./vue-i18n--ofs30OA.js";import"./PanelviewItemCompact-BsjnGQk1.js";import"./qrcode-D33vukyK.js";import"./marked-i_gIkIP3.js";import"./color-BTziYnFN.js";import"./vueuse-BpUDTOTZ.js";/* empty css            */import"./swiper-BL8lUzno.js";const G=p({name:"Albums",__name:"LibraryAlbums",setup(h){const o=a(!1),e=a(s.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=r.subscribe(m.MEDIA_ITEM_ADDED,i=>{i.object_id?.startsWith("library://artist")&&(o.value=!0)});y(t)});const n=async function(t){return o.value=!1,u(t),await r.getLibraryAlbums(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy,t.albumType,t.provider&&t.provider.length>0?t.provider:void 0,t.genreIds)},u=async function(t){if(!t.favoritesOnly&&!t.albumType&&!t.provider){e.value=s.libraryAlbumsCount;return}if(t.provider&&t.provider.length>0){e.value=void 0;return}e.value=await r.getLibraryAlbumsCount(t.favoritesOnly||void 0,t.albumType||void 0)};return(t,i)=>(_(),b(d,{itemtype:"albums",path:"libraryalbums","show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":n,"sort-keys":l,"update-available":o.value,title:t.$t("albums"),"allow-key-hooks":!0,"show-search-button":!0,"show-genre-filter":!0,icon:f(v),"restore-state":!0,total:e.value,"show-album-type-filter":!0,"show-provider-filter":!0},null,8,["update-available","title","icon","total"]))}});export{G as default};
