import{I as c}from"./ItemsListing-CHZs9N6z.js";import{a7 as p,F as r,a6 as i,L as u,ap as o,aN as m,N as _,ai as f,a9 as y}from"./index-CFcIX8RO.js";import"./Container-iGBsqgnx.js";import"./index-kQIztB-E.js";import"./Toolbar-DambSy-S.js";import"./VToolbar-B_3_MVxk.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 T=p({name:"Podcasts",__name:"LibraryPodcasts",setup(b){const a=r(!1),e=r(i.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"],l=async function(t){return a.value=!1,d(t),await o.getLibraryPodcasts(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy)},d=async function(t){if(!t.favoritesOnly){e.value=i.libraryPodcastsCount;return}e.value=await o.getLibraryPodcastsCount(t.favoritesOnly||!1)};return u(()=>{const t=o.subscribe(m.MEDIA_ITEM_ADDED,s=>{s.object_id?.startsWith("library://podcast")&&(a.value=!0)});_(t)}),(t,s)=>(y(),f(c,{itemtype:"podcasts",path:"librarypodcasts","show-duration":!1,"show-provider":!0,"show-favorites-only-filter":!0,"load-paged-data":l,"show-library":!0,"sort-keys":n,"update-available":a.value,title:t.$t("podcasts"),"allow-key-hooks":!0,"show-search-button":!0,icon:"mdi-podcast","restore-state":!0,total:e.value},null,8,["update-available","title","total"]))}});export{T as default};
