import{_ as c}from"./ItemsListing.vue_vue_type_style_index_0_lang-17edc154.js";import{l as f,r as n,o as y,L as e,a9 as r,b as _,y as d,z as b,x as v,M as m,K as h}from"./index-c2905444.js";import{s as a}from"./utils-a855eb36.js";import"./ListviewItem-90d92dc7.js";import"./ListItem-e72ce29c.js";import"./VImg-ee22af0e.js";import"./VMenu-8ba8f078.js";import"./VTooltip-54e33c2a.js";import"./VCheckboxBtn-020d02eb.js";import"./PanelviewItem.vue_vue_type_style_index_0_lang-74d21d61.js";import"./VCard-a2a52f2b.js";import"./contextmenu-c9d825c5.js";import"./eventbus-d154090d.js";import"./Alert-854e6197.js";import"./Container-920d5187.js";/* empty css              */import"./VToolbar-0b568cf9.js";import"./VTextField-b3baf9d7.js";import"./VBadge-78c551e8.js";import"./VRow-a177c0dd.js";import"./VVirtualScroll-da9f2ada.js";const P=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 a(250);e.syncTasks.value.length>0&&e.syncTasks.value.filter(i=>i.media_types.includes(m.ARTIST)).length!=0;)await a(500);await a(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([r.MEDIA_ITEM_ADDED,r.MEDIA_ITEM_UPDATED,r.MEDIA_ITEM_DELETED],i=>{var l;(l=i.object_id)!=null&&l.startsWith("library://artist")&&(s.value=!0)});_(t)}),(t,i)=>(d(),b(c,{itemtype:"artists",items:p.value,"show-provider":!1,"show-favorites-only-filter":!0,"load-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{P as default};
