import{I as p}from"./ItemsListing-Bt7nSL64.js";import{d as c,r as i,s as l,m as d,v as e,b2 as y,q as b,h as _,u as s,M as f,o as v}from"./index-BFxAF8P3.js";import"./Container-DiM3aZEa.js";import"./index-kQIztB-E.js";import"./VContainer-t8f0pxyy.js";/* empty css              */import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-IABQ_cGm.js";import"./VToolbar-4Hyomzsc.js";import"./VBtn-CWo0kh8N.js";import"./Button-DpLLjLX9.js";import"./ListItem-DLPNteOT.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-C9phX4G4.js";import"./VInput-CzWaDhLk.js";import"./MediaItemThumb-qBrtbw2Q.js";import"./PanelviewItemCompact-Dn5F-Rok.js";import"./VSpacer-Cg98NNsv.js";import"./VTextField-CudJeW4H.js";import"./VInfiniteScroll-C0KSwa81.js";import"./layout-Bgw3llWv.js";import"./VRow-B06TmOJY.js";import"./VVirtualScroll-ktNB5s8w.js";import"./VAlert-Dikxe4B7.js";const G=c({name:"Albums",__name:"LibraryAlbums",setup(h){const a=i(!1),o=i(l.libraryAlbumsCount),n=["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"];d(()=>{const t=e.subscribe(y.MEDIA_ITEM_ADDED,r=>{r.object_id?.startsWith("library://artist")&&(a.value=!0)});b(t)});const m=async function(t){return a.value=!1,u(t),await e.getLibraryAlbums(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy,t.albumType)},u=async function(t){if(!t.favoritesOnly&&!t.albumType){o.value=l.libraryAlbumsCount;return}o.value=await e.getLibraryAlbumsCount(t.favoritesOnly||void 0,t.albumType||void 0)};return(t,r)=>(v(),_(p,{itemtype:"albums",path:"libraryalbums","show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":m,"sort-keys":n,"update-available":a.value,title:t.$t("albums"),"allow-key-hooks":!0,"show-search-button":!0,icon:"mdi-album","restore-state":!0,total:o.value,"show-album-type-filter":!0,"extra-menu-items":[{label:"sync_now",icon:"mdi-sync",action:()=>{s(e).startSync([s(f).ALBUM])},overflowAllowed:!0,disabled:s(e).syncTasks.value.length>0}]},null,8,["update-available","title","total","extra-menu-items"]))}});export{G as default};
