import{_ as u}from"./ItemsListing.vue_vue_type_style_index_0_lang-38bc2f50.js";import{l as f,r as l,o as c,H as e,ao as r,b as _,v as y,x as d,M as n,ap as o}from"./index-dcf0de03.js";import"./ListviewItem-2c46c8ee.js";import"./MediaItemThumb.vue_vue_type_style_index_0_lang-b38d9ae1.js";import"./ListItem-6dad7331.js";import"./VBtn-a0da5efe.js";import"./VMenu-3bdd1b96.js";import"./index-0afee102.js";import"./VListItem-943ee224.js";import"./VCheckboxBtn-d54a899d.js";import"./VCard-111cabcf.js";/* empty css                             */import"./PanelviewItem.vue_vue_type_style_index_0_lang-44df1bef.js";import"./contextmenu-ec34ccac.js";import"./eventbus-d154090d.js";import"./Alert-eb81bdeb.js";import"./Container-d623752d.js";/* empty css              */import"./VToolbar-dfba6de4.js";import"./VTextField-f81f9175.js";import"./VBadge-8be61727.js";import"./VRow-73379099.js";const P=f({__name:"LibraryArtists",setup(v){const p=l([]),a=l(!1),m=async function(t){if(t.refresh){for(e.startSync([n.ARTIST]),await o(250);e.syncTasks.value.length>0&&e.syncTasks.value.filter(i=>i.media_types.includes(n.ARTIST)).length!=0;)await o(500);await o(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 s;(s=i.object_id)!=null&&s.startsWith("library://artist")&&(a.value=!0)});_(t)}),(t,i)=>(y(),d(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:t.$t("artists"),"allow-key-hooks":!0,"show-search-button":!0},null,8,["items","update-available","title"]))}});export{P as default};
