import{I as c}from"./ItemsListing-Dd2XfzXe.js";import{s as a,c as r,E as p}from"./index-HFEfURXv.js";import{d as u,r as i,o as m,a1 as f,D as v,e as _,B as y,av as b}from"./lucide-sS6c3snl.js";import"./Container-LvH0QRIT.js";import"./index-kQIztB-E.js";import"./vuetify-ffr1lJCG.js";import"./Toolbar-BVGuuXVD.js";import"./vue-router-CDtPtBGv.js";import"./Button-Dcdmvtuy.js";import"./ListItem-C-8fkaRP.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-Bgx2hOXi.js";import"./MediaItemThumb-D4l-2_B4.js";import"./vue-i18n-h4EBIvPF.js";import"./PanelviewItemCompact-PrcYkefq.js";import"./userPreferences-CRnDt302.js";import"./qrcode-Dq-byqKu.js";import"./marked-C0Rlrcoy.js";import"./color-BTziYnFN.js";import"./vueuse-B-HgI0gk.js";/* empty css            */import"./swiper-BtP4dEja.js";const z=u({name:"Podcasts",__name:"LibraryPodcasts",setup(h){const o=i(!1),e=i(a.libraryPodcastsCount),n=["name","name_desc","sort_name","sort_name_desc","timestamp_added","timestamp_added_desc","timestamp_modified","timestamp_modified_desc","last_played","last_played_desc","play_count","play_count_desc"],d=async function(t){return o.value=!1,l(t),await r.getLibraryPodcasts(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy,t.provider&&t.provider.length>0?t.provider:void 0)},l=async function(t){if(!t.favoritesOnly&&!t.provider){e.value=a.libraryPodcastsCount;return}if(t.provider&&t.provider.length>0){e.value=void 0;return}e.value=await r.getLibraryPodcastsCount(t.favoritesOnly||!1)};return m(()=>{const t=r.subscribe(p.MEDIA_ITEM_ADDED,s=>{s.object_id?.startsWith("library://podcast")&&(o.value=!0)});f(t)}),(t,s)=>(_(),v(c,{itemtype:"podcasts",path:"librarypodcasts","show-duration":!1,"show-provider":!0,"show-favorites-only-filter":!0,"load-paged-data":d,"show-library":!0,"sort-keys":n,"update-available":o.value,title:t.$t("podcasts"),"allow-key-hooks":!0,"show-search-button":!0,icon:y(b),"restore-state":!0,total:e.value,"show-provider-filter":!0},null,8,["update-available","title","icon","total"]))}});export{z as default};
