import{I as c}from"./ItemsListing-1e4c97cc.js";import{d,r,o as _,b as e,ab as i,a as f,c as y,e as b,M as l,aq as n}from"./index-13cec455.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_d4387993_lang-070a5f76.js";import"./eventbus-1a74ea4a.js";import"./VListItem-3995941d.js";import"./VLabel-dc3f418b.js";import"./VList-a053873b.js";import"./VCardText-3285fd42.js";import"./VCard-7c0bc2b7.js";import"./VMenu-693c2219.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./ListItem-359f4456.js";import"./Button-a9c1eb8e.js";import"./PanelviewItemCompact-ca3ca463.js";import"./VCheckboxBtn-deee0e68.js";import"./VSpacer-46ab8aa1.js";/* empty css              */import"./VAlert-3e4ba415.js";import"./Container-34b102f9.js";import"./Toolbar-c1a5714a.js";import"./VToolbar-be936393.js";import"./VTextField-59596a04.js";import"./VVirtualScroll-c6e56d95.js";import"./VInfiniteScroll-cb91c423.js";import"./layout-5b19be1f.js";const z=d({name:"Artists",__name:"LibraryArtists",setup(v){const m=r([]),s=r(!1),p=["name","name_desc","sort_name","sort_name_desc","timestamp_added","timestamp_added_desc","last_played","last_played_desc","play_count","play_count_desc"],u=async function(t){if(t.refresh&&!s.value)for(e.startSync([l.ARTIST]),await n(250);e.syncTasks.value.length>0&&e.syncTasks.value.filter(a=>a.media_types.includes(l.ARTIST)).length!=0;)await n(500);return s.value=!1,await e.getLibraryArtists(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy,t.albumArtistsFilter)};return _(()=>{const t=e.subscribe_multi([i.MEDIA_ITEM_ADDED,i.MEDIA_ITEM_UPDATED,i.MEDIA_ITEM_DELETED],a=>{var o;(o=a.object_id)!=null&&o.startsWith("library://artist")&&(s.value=!0)});f(t)}),(t,a)=>(y(),b(c,{itemtype:"artists",items:m.value,"show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":u,"show-album-artists-only-filter":!0,"update-available":s.value,title:t.$t("artists"),"allow-key-hooks":!0,"show-search-button":!0,"sort-keys":p,icon:"mdi-account-outline","restore-state":!0},null,8,["items","update-available","title"]))}});export{z as default};
