import{I as d}from"./ItemsListing-KtvqXRYj.js";import{s,f as r,E as m}from"./index-Cpyo7KMo.js";import{d as p,r as a,o as c,a0 as y,D as b,u as f,aJ as v,e as _}from"./lucide-CCrbsyJI.js";import"./Container-DYZU9MIY.js";import"./index-kQIztB-E.js";import"./vuetify-DEtiqX2e.js";import"./Toolbar-D8YIoiCi.js";import"./userPreferences-6opwxEkN.js";import"./vue-router-D-D-f2lE.js";import"./Button-C0UlHjBg.js";import"./ListItem-CIldTlv1.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-BERW6gDd.js";import"./MediaItemThumb-D8fpTfkJ.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-BGdiLcR-.js";import"./vue-i18n-krBRuO6q.js";import"./PanelviewItemCompact-BAfN9DpK.js";import"./color-CcshWhNz.js";import"./qrcode-CCHMWIXh.js";import"./marked-i_gIkIP3.js";import"./vueuse-FEBxOGD_.js";/* empty css            */import"./swiper-YiD1SI-4.js";const F=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{F as default};
