import{_ as c}from"./ItemsListing.vue_vue_type_style_index_0_lang-7fc10190.js";import{v as f,r as n,o as y,L as e,al as i,b as _,y as d,z as b,x as v,M as m,am as r,K as h}from"./index-3053b8a0.js";import"./ListviewItem-72b197ce.js";import"./VBadge-8491964b.js";import"./Container-c68e3d11.js";import"./forwardRefs-0f883695.js";import"./VMenu-c1b42799.js";/* empty css              */import"./VCheckboxBtn-1d21707b.js";import"./VSlideGroup-e1d3104d.js";import"./VCard-2d8a440d.js";import"./VCardText-197cfd2e.js";import"./VTooltip-cd5b17c3.js";import"./PanelviewItem.vue_vue_type_style_index_0_lang-c1d34c1c.js";import"./contextmenu-e2a33e90.js";import"./Alert-55f2ffb8.js";import"./VToolbar-9817dcd3.js";import"./VTextField-b7863fc2.js";import"./VVirtualScroll-bc1f8e5c.js";const z=f({__name:"LibraryArtists",setup(E){const u=n([]),s=n(!1),o={name:"sort_name",recent:"timestamp_added DESC"},p=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:u.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{z as default};
