import{_ as c}from"./ItemsListing.vue_vue_type_style_index_0_lang-6fa46e09.js";import{l as f,r as n,o as _,J as e,ai as i,b as y,v as d,x as b,q as v,M as u,aj as r,I as h}from"./index-e5db0b73.js";import"./ListviewItem-7c178b7a.js";import"./VBadge-efd00f67.js";import"./ListItem-ac3869d3.js";import"./VImg-7a057c50.js";import"./VMenu-d9833a31.js";import"./VCheckboxBtn-46446b67.js";import"./VCard-c9b9f4e9.js";import"./VTooltip-71530943.js";import"./PanelviewItem.vue_vue_type_style_index_0_lang-221d4edc.js";import"./contextmenu-8eac6b44.js";import"./Alert-1172b8fb.js";import"./Container-238e2d02.js";import"./VToolbar-4e8dded4.js";import"./VTextField-46667b30.js";import"./VVirtualScroll-01555b84.js";const $=f({__name:"LibraryArtists",setup(E){const m=n([]),s=n(!1),o={name:"sort_name",recent:"timestamp_added DESC"},p=async function(t){if(t.refresh&&!s.value){for(e.startSync([u.ARTIST]),await r(250);e.syncTasks.value.length>0&&e.syncTasks.value.filter(a=>a.media_types.includes(u.ARTIST)).length!=0;)await r(500);await r(500)}return s.value=!1,await e.getLibraryArtists(t.favoritesOnly||void 0,t.search,t.limit,t.offset,o[t.sortBy],t.albumArtistsFilter)};return _(()=>{const t=e.subscribe_multi([i.MEDIA_ITEM_ADDED,i.MEDIA_ITEM_UPDATED,i.MEDIA_ITEM_DELETED],a=>{var l;(l=a.object_id)!=null&&l.startsWith("library://artist")&&(s.value=!0)});y(t)}),(t,a)=>(d(),b(c,{itemtype:"artists",items:m.value,"show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":p,"show-album-artists-only-filter":!0,"update-available":s.value,title:v(h)("bp4")?t.$t("artists"):"","allow-key-hooks":!0,"show-search-button":!0,"sort-keys":Object.keys(o)},null,8,["items","update-available","title","sort-keys"]))}});export{$ as default};
