import{_ as f}from"./AddManualLink.vue_vue_type_script_setup_true_lang-S7Rl42zD.js";import{I as v}from"./ItemsListing-C9zw7KHa.js";import{s as l,f as i,E as y,M as _}from"./index-CyXUjyDM.js";import{d as b,r as s,o as h,a0 as g,b as w,H as n,u as d,aE as E,F as R,e as I}from"./lucide-BsOfcLnq.js";import"./Toolbar-CTiACIvy.js";import"./vuetify-DHCm6MV9.js";import"./Container-D40_MO5w.js";import"./index-kQIztB-E.js";import"./userPreferences-CnLqlkxN.js";import"./vue-router-hLkI791z.js";import"./Button-DbnN1LyR.js";import"./ListItem-_zvhSn9K.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-cya6xPO3.js";import"./MediaItemThumb-BvqlnbT6.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-CsLTxntn.js";import"./vue-i18n-CXdnqGsF.js";import"./PanelviewItemCompact-Dlf-jeIa.js";import"./qrcode-DcFvg0BH.js";import"./marked-i_gIkIP3.js";import"./color-BTziYnFN.js";import"./vueuse-CmMrRm2c.js";/* empty css            */import"./swiper-BIRaDS2w.js";const Q=b({name:"Radios",__name:"LibraryRadios",setup(A){const a=s(!1),t=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 e=i.subscribe(y.MEDIA_ITEM_ADDED,o=>{o.object_id?.startsWith("library://radio")&&(a.value=!0)});g(e)});const p=async function(e){return a.value=!1,m(e),await i.getLibraryRadios(e.favoritesOnly||void 0,e.search,e.limit,e.offset,e.sortBy,e.provider&&e.provider.length>0?e.provider:void 0,e.genreIds)},m=async function(e){if(!e.favoritesOnly&&!e.provider){t.value=l.libraryRadiosCount;return}if(e.provider&&e.provider.length>0){t.value=void 0;return}t.value=await i.getLibraryRadiosCount(e.favoritesOnly||!1)};return(e,o)=>(I(),w(R,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:e.$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:t.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{Q as default};
