import{I as c}from"./ItemsListing-6e3c9168.js";import{d,r,o as _,b as e,a6 as i,a as f,c as y,e as b,M as l}from"./index-0272dc54.js";import{n}from"./utils-a32c3776.js";import"./eventbus-e44cf169.js";import"./VListItem-a3b7f8b7.js";import"./ListItem-ab5df53d.js";import"./Button-7bab5496.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./VTextField-0a661ba3.js";import"./VVirtualScroll-c94c27f1.js";import"./VMenu-30df3a7b.js";import"./VCard-88cdf1d8.js";import"./VCardText-41d932c2.js";import"./VSpacer-39969d39.js";/* empty css              */import"./Alert-4069c5b8.js";import"./VAlert-fb48582c.js";import"./Container-3f082c46.js";import"./Toolbar-b074e682.js";import"./VList-21f55857.js";import"./VToolbar-3145d715.js";import"./VInfiniteScroll-d471d074.js";import"./layout-e087828e.js";import"./VChip-e0012620.js";const q=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{q as default};
