import{_ as c}from"./ItemsListing.vue_vue_type_style_index_0_lang-100045ef.js";import{v as f,r as n,o as y,L as e,ak as i,b as _,y as d,z as b,x as v,M as m,al as r,K as h}from"./index-96a89f99.js";import"./ListviewItem-773c5bab.js";import"./VBadge-bbd5dd5d.js";import"./ListItem-0334be0a.js";import"./forwardRefs-d1b36928.js";import"./VMenu-48d1df5c.js";import"./VCheckboxBtn-b5a7dcd4.js";import"./VSlideGroup-9d54be14.js";import"./VCard-e4d98c58.js";import"./VCardText-e8638424.js";import"./VTooltip-28444823.js";import"./PanelviewItem.vue_vue_type_style_index_0_lang-694ef246.js";import"./contextmenu-c07cf085.js";import"./Alert-d6ed854e.js";import"./Container-0be9c84f.js";/* empty css              */import"./VToolbar-23122cac.js";import"./VTextField-20c6a6f8.js";import"./VVirtualScroll-a42cd261.js";const F=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{F as default};
