import{I as f}from"./ItemsListing-Bt7nSL64.js";import{d as _,r as l,s as n,m as v,v as e,b2 as b,q as w,c as h,b as d,u as o,M as m,F as g,o as A}from"./index-BFxAF8P3.js";import{_ as R}from"./AddManualLink.vue_vue_type_script_setup_true_lang-Cr5_qudt.js";import"./Container-DiM3aZEa.js";import"./index-kQIztB-E.js";import"./VContainer-t8f0pxyy.js";/* empty css              */import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-IABQ_cGm.js";import"./VToolbar-4Hyomzsc.js";import"./VBtn-CWo0kh8N.js";import"./Button-DpLLjLX9.js";import"./ListItem-DLPNteOT.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-C9phX4G4.js";import"./VInput-CzWaDhLk.js";import"./MediaItemThumb-qBrtbw2Q.js";import"./PanelviewItemCompact-Dn5F-Rok.js";import"./VSpacer-Cg98NNsv.js";import"./VTextField-CudJeW4H.js";import"./VInfiniteScroll-C0KSwa81.js";import"./layout-Bgw3llWv.js";import"./VRow-B06TmOJY.js";import"./VVirtualScroll-ktNB5s8w.js";import"./VAlert-Dikxe4B7.js";import"./VDialog-jEFtM9ke.js";const Q=_({name:"Radios",__name:"LibraryRadios",setup(D){const s=l(!1),i=l(n.libraryRadiosCount),r=l(!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"];v(()=>{const t=e.subscribe(b.MEDIA_ITEM_ADDED,a=>{a.object_id?.startsWith("library://radio")&&(s.value=!0)});w(t)});const p=async function(t){return s.value=!1,c(t),await e.getLibraryRadios(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy)},c=async function(t){if(!t.favoritesOnly){i.value=n.libraryRadiosCount;return}i.value=await e.getLibraryRadiosCount(t.favoritesOnly||!1)};return(t,a)=>(A(),h(g,null,[d(f,{itemtype:"radios",path:"libraryradios","show-duration":!1,"show-provider":!1,"show-favorites-only-filter":!0,"load-paged-data":p,"sort-keys":u,"update-available":s.value,title:t.$t("radios"),"show-search-button":!0,"allow-key-hooks":!0,"extra-menu-items":[{label:"sync_now",icon:"mdi-sync",action:()=>{o(e).startSync([o(m).RADIO])},overflowAllowed:!0,disabled:o(e).syncTasks.value.length>0},{label:"add_url_item",labelArgs:[],action:()=>{r.value=!0},icon:"mdi-playlist-plus"}],icon:"mdi-access-point","restore-state":!0,total:i.value},null,8,["update-available","title","extra-menu-items","total"]),d(R,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=y=>r.value=y),type:o(m).RADIO},null,8,["modelValue","type"])],64))}});export{Q as default};
