import{_ as u}from"./ItemsListing.vue_vue_type_style_index_0_lang-1ef061d8.js";import{l as f,r as l,o as c,L as e,ai as o,b as _,y as b,z as d,x as y,M as m,aj as r,K as v}from"./index-ebe4cd91.js";import"./ListviewItem-5151f17f.js";import"./MediaItemThumb.vue_vue_type_style_index_0_lang-bf2386aa.js";import"./ListItem-a20c73ec.js";import"./VImg-b5692565.js";import"./VMenu-86ca5efe.js";import"./index-bda4e7b4.js";import"./VListItem-0df8c60b.js";import"./VCheckboxBtn-fcc73f36.js";import"./VCard-46ebf6a3.js";/* empty css                             */import"./PanelviewItem.vue_vue_type_style_index_0_lang-516932fb.js";import"./contextmenu-b7cc1c45.js";import"./eventbus-d154090d.js";import"./Alert-d031836e.js";import"./Container-1375a850.js";/* empty css              */import"./VToolbar-76e5fae8.js";import"./VTextField-034239e4.js";import"./VBadge-0ad57746.js";import"./VRow-03e92c8f.js";const W=f({__name:"LibraryAlbums",setup(E){const n=l([]),i=l(!1);c(()=>{const t=e.subscribe_multi([o.MEDIA_ITEM_ADDED,o.MEDIA_ITEM_UPDATED,o.MEDIA_ITEM_DELETED],a=>{var s;(s=a.object_id)!=null&&s.startsWith("library://artist")&&(i.value=!0)});_(t)});const p=async function(t){if(t.refresh){for(e.startSync([m.ALBUM]),await r(250);e.syncTasks.value.length>0&&e.syncTasks.value.filter(a=>a.media_types.includes(m.ALBUM)).length!=0;)await r(500);await r(500)}return i.value=!1,await e.getLibraryAlbums(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy)};return(t,a)=>(b(),d(u,{itemtype:"albums",items:n.value,"show-provider":!1,"show-favorites-only-filter":!0,"load-data":p,"sort-keys":["sort_name","timestamp_added DESC","sort_artist","year"],"update-available":i.value,title:y(v)("bp4")?t.$t("albums"):"","allow-key-hooks":!0,"show-search-button":!0},null,8,["items","update-available","title"]))}});export{W as default};
