import{_ as c}from"./ItemsListing.vue_vue_type_style_index_0_lang-e3f0c114.js";import{y as f,r as n,o as y,N as e,ap as i,b as _,A as d,B as b,z as v,O as m,aq as r,M as h}from"./index-9b822783.js";import"./ListviewItem-030e11e6.js";import"./VBadge-c9fb58c5.js";import"./Container-05be0da0.js";import"./forwardRefs-af0663a3.js";import"./VMenu-8029677e.js";/* empty css              */import"./VInput-c159036c.js";import"./VSlideGroup-d3ac8eca.js";import"./VCard-0d72f9dd.js";import"./VCardText-bc96863a.js";import"./VTooltip-5955b4ca.js";import"./PanelviewItem.vue_vue_type_style_index_0_lang-846c4785.js";import"./contextmenu-b55bad56.js";import"./Alert-112324b3.js";import"./VAlert-fddf489c.js";import"./VToolbar-79c684b4.js";import"./VTextField-7d804c49.js";import"./VVirtualScroll-a3d1c1c9.js";import"./layout-71937d76.js";const K=f({__name:"LibraryArtists",setup(E){const p=n([]),s=n(!1),o={name:"sort_name",recent:"timestamp_added DESC"},u=async function(t){if(t.refresh&&!s.value){for(e.startSync([m.ARTIST]),await r(250);e.syncTasks.value.length>0&&e.syncTasks.value.filter(a=>a.media_types.includes(m.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 y(()=>{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)});_(t)}),(t,a)=>(d(),b(c,{itemtype:"artists",items:p.value,"show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":u,"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{K as default};
