import{I as d}from"./ItemsListing-e8i_b9av.js";import{s as a,a as r,E as m}from"./index-Cc0s9xHj.js";import{d as p,r as s,o as c,a3 as b,G as y,u as v,aQ as f,b as _}from"./lucide-C_a_D9Y7.js";import"./Container-C8q3OdIF.js";import"./index-kQIztB-E.js";import"./vuetify-CvGbteJu.js";import"./Toolbar-CpDb2XyG.js";import"./userPreferences-CgJSfdV_.js";import"./vue-router-lrCq0UAu.js";import"./Button-CCvS9sA_.js";import"./ListItem-Ct4Nbn6d.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DhKX4Vvj.js";import"./MediaItemThumb-CN3YtoJY.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-7ardqVNw.js";import"./vue-i18n-COI_JhGQ.js";import"./PanelviewItemCompact-CL6Psz6q.js";import"./qrcode-DICVlH4J.js";import"./marked-D9eDbhZJ.js";import"./color-CqFg8eif.js";import"./vueuse-Blk5jQ0T.js";/* empty css            */import"./swiper-UowLVX5q.js";const z=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(m.MEDIA_ITEM_ADDED,i=>{i.object_id?.startsWith("library://artist")&&(o.value=!0)});b(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=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)=>(_(),y(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:v(f),"restore-state":!0,total:e.value,"show-album-type-filter":!0,"show-provider-filter":!0},null,8,["update-available","title","icon","total"]))}});export{z as default};
