import{_ as c}from"./ItemsListing.vue_vue_type_style_index_0_lang-5f9be450.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-4abadf84.js";import"./ListviewItem-233411ae.js";import"./VBadge-148f67ae.js";import"./Container-cc02c26a.js";import"./forwardRefs-7da7908a.js";import"./VMenu-5b409939.js";/* empty css              */import"./VCheckboxBtn-c7727adb.js";import"./VSlideGroup-fc835928.js";import"./VCard-63dfea61.js";import"./VCardText-a4be1fd3.js";import"./VTooltip-2600ff41.js";import"./PanelviewItem.vue_vue_type_style_index_0_lang-3d5ca720.js";import"./contextmenu-c1d86d74.js";import"./Alert-3abd6204.js";import"./VToolbar-42c79991.js";import"./VTextField-ce4a0dcf.js";import"./VVirtualScroll-26a90d88.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};
