import{_ as u}from"./ItemsListing.vue_vue_type_style_index_0_lang-1ef061d8.js";import{l as f,r as l,o as c,L as e,ai as r,b as _,y,z as b,x as d,M as n,aj as s,K as v}from"./index-ebe4cd91.js";import"./ListviewItem-5151f17f.js";import"./MediaItemThumb.vue_vue_type_style_index_0_lang-bf2386aa.js";import"./ListItem-a20c73ec.js";import"./VImg-b5692565.js";import"./VMenu-86ca5efe.js";import"./index-bda4e7b4.js";import"./VListItem-0df8c60b.js";import"./VCheckboxBtn-fcc73f36.js";import"./VCard-46ebf6a3.js";/* empty css                             */import"./PanelviewItem.vue_vue_type_style_index_0_lang-516932fb.js";import"./contextmenu-b7cc1c45.js";import"./eventbus-d154090d.js";import"./Alert-d031836e.js";import"./Container-1375a850.js";/* empty css              */import"./VToolbar-76e5fae8.js";import"./VTextField-034239e4.js";import"./VBadge-0ad57746.js";import"./VRow-03e92c8f.js";const V=f({__name:"LibraryArtists",setup(h){const p=l([]),a=l(!1),m=async function(t){if(t.refresh){for(e.startSync([n.ARTIST]),await s(250);e.syncTasks.value.length>0&&e.syncTasks.value.filter(i=>i.media_types.includes(n.ARTIST)).length!=0;)await s(500);await s(500)}return a.value=!1,await e.getLibraryArtists(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy)};return c(()=>{const t=e.subscribe_multi([r.MEDIA_ITEM_ADDED,r.MEDIA_ITEM_UPDATED,r.MEDIA_ITEM_DELETED],i=>{var o;(o=i.object_id)!=null&&o.startsWith("library://artist")&&(a.value=!0)});_(t)}),(t,i)=>(y(),b(u,{itemtype:"artists",items:p.value,"show-provider":!1,"show-favorites-only-filter":!0,"load-data":m,"show-album-artists-only-filter":!0,"update-available":a.value,title:d(v)("bp4")?t.$t("artists"):"","allow-key-hooks":!0,"show-search-button":!0},null,8,["items","update-available","title"]))}});export{V as default};
