import{_ as c}from"./AddManualLink.vue_vue_type_script_setup_true_lang-BSD43rWS.js";import{I as f}from"./ItemsListing-CHZs9N6z.js";import{a7 as y,F as i,a6 as l,L as _,ap as r,aN as v,N as b,a8 as h,a9 as w,o as n,ac as g,aq as R,a0 as A}from"./index-CFcIX8RO.js";import"./Toolbar-DambSy-S.js";import"./VToolbar-B_3_MVxk.js";import"./VDialog-C2cPU7vi.js";import"./Container-iGBsqgnx.js";import"./index-kQIztB-E.js";import"./Button-IxLZkOI0.js";import"./ListItem-CWPLlf7K.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-CGTv89Z9.js";import"./VCheckboxBtn-Dy9mjR59.js";import"./MediaItemThumb-oOnMmU-2.js";import"./PanelviewItemCompact-YHP34gKS.js";import"./VInfiniteScroll-DY-7nfIB.js";import"./VVirtualScroll-BRrQ8Y7O.js";import"./VAlert-DZurr_D6.js";const K=y({name:"Radios",__name:"LibraryRadios",setup(D){const e=i(!1),o=i(l.libraryRadiosCount),s=i(!1),d=["name","name_desc","sort_name","sort_name_desc","timestamp_added","timestamp_added_desc","last_played","last_played_desc","play_count","play_count_desc"];_(()=>{const t=r.subscribe(v.MEDIA_ITEM_ADDED,a=>{a.object_id?.startsWith("library://radio")&&(e.value=!0)});b(t)});const u=async function(t){return e.value=!1,m(t),await r.getLibraryRadios(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy)},m=async function(t){if(!t.favoritesOnly){o.value=l.libraryRadiosCount;return}o.value=await r.getLibraryRadiosCount(t.favoritesOnly||!1)};return(t,a)=>(w(),h(A,null,[n(f,{itemtype:"radios",path:"libraryradios","show-duration":!1,"show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":u,"sort-keys":d,"update-available":e.value,title:t.$t("radios"),"show-search-button":!0,"allow-key-hooks":!0,"extra-menu-items":[{label:"add_url_item",labelArgs:[],action:()=>{s.value=!0},icon:"mdi-playlist-plus"}],icon:"mdi-access-point","restore-state":!0,total:o.value},null,8,["update-available","title","extra-menu-items","total"]),n(c,{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=p=>s.value=p),type:g(R).RADIO},null,8,["modelValue","type"])],64))}});export{K as default};
