import{_ as d}from"./ItemsListing.vue_vue_type_style_index_0_lang-02893598.js";import{d as u,r as l,o as c,b as e,ah as i,a as y,c as f,e as E,M as m,ai as n}from"./index-0ae84607.js";import"./ListviewItem-156d947d.js";import"./VBadge-bfb26993.js";import"./Container-eb92362b.js";import"./forwardRefs-d0d7c5bd.js";import"./Button-a1dfd3f5.js";import"./VMenu-f26d3a19.js";/* empty css              */import"./VInput-00e20677.js";import"./VSlideGroup-18f8a11f.js";import"./VCard-e96ab32b.js";import"./VCardText-b1a0de89.js";import"./VTooltip-054ea37d.js";import"./PanelviewItem.vue_vue_type_style_index_0_lang-a0b4c306.js";import"./contextmenu-5ae46870.js";import"./Alert-ee4ff93d.js";import"./VAlert-212471f5.js";import"./VToolbar-b7dd8339.js";import"./VTextField-4bf39c0d.js";import"./VVirtualScroll-06bbaaf5.js";import"./layout-f3684635.js";const P=u({name:"Artists",__name:"LibraryArtists",setup(b){const p=l([]),a=l(!1),o={name:"name",name_desc:"name DESC",sort_name:"sort_name",sort_name_desc:"sort_name DESC",timestamp_added:"timestamp_added",timestamp_added_desc:"timestamp_added DESC",last_played:"last_played",last_played_desc:"last_played DESC",play_count:"play_count",play_count_desc:"play_count DESC"},_=async function(t){if(t.refresh&&!a.value)for(e.startSync([m.ARTIST]),await n(250);e.syncTasks.value.length>0&&e.syncTasks.value.filter(s=>s.media_types.includes(m.ARTIST)).length!=0;)await n(500);return a.value=!1,await e.getLibraryArtists(t.favoritesOnly||void 0,t.search,t.limit,t.offset,o[t.sortBy],t.albumArtistsFilter)};return c(()=>{const t=e.subscribe_multi([i.MEDIA_ITEM_ADDED,i.MEDIA_ITEM_UPDATED,i.MEDIA_ITEM_DELETED],s=>{var r;(r=s.object_id)!=null&&r.startsWith("library://artist")&&(a.value=!0)});y(t)}),(t,s)=>(f(),E(d,{itemtype:"artists",items:p.value,"show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":_,"show-album-artists-only-filter":!0,"update-available":a.value,title: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{P as default};
