import{_ as f}from"./AddManualLink.vue_vue_type_script_setup_true_lang-CKLFyak0.js";import{I as v}from"./ItemsListing-D6AMqIYc.js";import{s as l,c as i,E as y,M as _}from"./index-CxiRlsCY.js";import{d as b,r as s,o as h,a0 as g,b as w,e as R,H as n,u as d,ax as E,F as A}from"./lucide-C2DU1LFb.js";import"./Toolbar-MwYpbj3t.js";import"./vuetify-RelkxOq-.js";import"./Container-CwfZ2VgM.js";import"./index-kQIztB-E.js";import"./utils-CDN07tui.js";import"./userPreferences-ln7cf3P6.js";import"./vue-router-BgJK_hRC.js";import"./Button-DBt8j7D4.js";import"./ListItem-DzUpG5Dm.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-D7lqdhVg.js";import"./MediaItemThumb-C7OhU3lK.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-C17dV9_V.js";import"./vue-i18n-DySrp6mW.js";import"./PanelviewItemCompact-Cjl_ij1h.js";import"./qrcode-DSFhiIp2.js";import"./marked-C0Rlrcoy.js";import"./color-BTziYnFN.js";import"./vueuse-DIaEWNCo.js";/* empty css            */import"./swiper-Jy9GbtzK.js";const S=b({name:"Radios",__name:"LibraryRadios",setup(D){const a=s(!1),e=s(l.libraryRadiosCount),r=s(!1),u=["name","name_desc","sort_name","sort_name_desc","timestamp_added","timestamp_added_desc","last_played","last_played_desc","play_count","play_count_desc"];h(()=>{const t=i.subscribe(y.MEDIA_ITEM_ADDED,o=>{o.object_id?.startsWith("library://radio")&&(a.value=!0)});g(t)});const p=async function(t){return a.value=!1,m(t),await i.getLibraryRadios(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy,t.provider&&t.provider.length>0?t.provider:void 0)},m=async function(t){if(!t.favoritesOnly&&!t.provider){e.value=l.libraryRadiosCount;return}if(t.provider&&t.provider.length>0){e.value=void 0;return}e.value=await i.getLibraryRadiosCount(t.favoritesOnly||!1)};return(t,o)=>(R(),w(A,null,[n(v,{itemtype:"radios",path:"libraryradios","show-duration":!1,"show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":p,"sort-keys":u,"update-available":a.value,title:t.$t("radios"),"show-search-button":!0,"allow-key-hooks":!0,"extra-menu-items":[{label:"add_url_item",labelArgs:[],action:()=>{r.value=!0},icon:"mdi-playlist-plus"}],icon:d(E),"restore-state":!0,total:e.value,"show-provider-filter":!0},null,8,["update-available","title","extra-menu-items","icon","total"]),n(f,{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=c=>r.value=c),type:d(_).RADIO},null,8,["modelValue","type"])],64))}});export{S as default};
