import{I as d}from"./ItemsListing-Cnfrbqt8.js";import{az as m,J as i,b7 as s,a3 as p,bc as r,bB as c,a4 as b,aF as y,aG as v,aE as _}from"./index-D2rF_80D.js";import{D as f}from"./disc-3-Cgy2B2Vr.js";import"./Container-C7yRkeCv.js";import"./index-kQIztB-E.js";import"./Toolbar-C66D0zTJ.js";import"./VToolbar-Db4qfa2C.js";import"./Button-CrfR8Gdt.js";import"./ListItem-CU9QYmiw.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-cf4_7ViH.js";import"./MediaItemThumb-A-03axGx.js";import"./VCheckbox-DccbdgFZ.js";import"./VCheckboxBtn-Dik76WyM.js";import"./VSelectionControl-BHjDOTFl.js";import"./PanelviewItemCompact-BWonx8dk.js";import"./userPreferences-DWdlmlmR.js";import"./VInfiniteScroll-CfzetGUD.js";import"./VVirtualScroll-CG155sfU.js";import"./createLucideIcon-Bb8oGlVw.js";const K=m({name:"Albums",__name:"LibraryAlbums",setup(h){const o=i(!1),e=i(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"];p(()=>{const t=r.subscribe(c.MEDIA_ITEM_ADDED,a=>{a.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)},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,a)=>(v(),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,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{K as default};
