import{I as m}from"./ItemsListing-eVdafYr6.js";import{s as a,c as r,E as d}from"./index-Df2MtF-k.js";import{d as p,r as s,o as c,a2 as y,D as b,e as v,B as _,ar as f}from"./lucide-PBDL9g_H.js";import"./Container-BIrizOVu.js";import"./index-kQIztB-E.js";import"./vuetify-D_QaYjDz.js";import"./Toolbar-C9FGE9Cx.js";import"./vue-router-BTykswgC.js";import"./Button-BIXkLIBy.js";import"./ListItem-CvIa-5A0.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DELv5odx.js";import"./MediaItemThumb-BC5MycuJ.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-BEhybLFg.js";import"./vue-i18n-CYwaof5n.js";import"./PanelviewItemCompact-C3B2OPOu.js";import"./userPreferences-BS-h7Wmh.js";import"./qrcode-CCr-KruI.js";import"./marked-C0Rlrcoy.js";import"./color-BTziYnFN.js";import"./vueuse-w9cS6Vug.js";/* empty css            */import"./swiper-BLmWk8fI.js";const G=p({name:"Albums",__name:"LibraryAlbums",setup(h){const o=s(!1),e=s(a.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(d.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)},u=async function(t){if(!t.favoritesOnly&&!t.albumType&&!t.provider){e.value=a.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)=>(v(),b(m,{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,icon:_(f),"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};
