import{I as c}from"./ItemsListing-XUXN-Um6.js";import{d as p,r as i,s as n,m as u,v as e,a$ as y,q as _,h as f,u as s,M as v,o as b}from"./index-Bn2Tzsay.js";import"./Container-CEbFgC5b.js";import"./index-CBho6rsP.js";import"./VContainer-CRIwFZfO.js";/* empty css              */import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-Ba4dAxS1.js";import"./VToolbar-Z0nE2qFc.js";import"./VBtn-BQk37KYJ.js";import"./Button-r9Wpw3CQ.js";import"./ListItem-BNbxxrdg.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DCLVCnPO.js";import"./VInput-C_1AW61Q.js";import"./MediaItemThumb-B7hfZSf2.js";import"./PanelviewItemCompact-By5cXXTW.js";import"./VSpacer-ygjaGObn.js";import"./VTextField-fPA0WAHx.js";import"./VInfiniteScroll-DvbiA0kw.js";import"./layout-kFqKNtL6.js";import"./VRow-CNVApy9v.js";import"./VVirtualScroll-B56qZ1Y0.js";import"./VAlert-Bj5fXNhB.js";const F=p({name:"Podcasts",__name:"LibraryPodcasts",setup(h){const o=i(!1),a=i(n.libraryPodcastsCount),l=["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,m(t),await e.getLibraryPodcasts(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy)},m=async function(t){if(!t.favoritesOnly){a.value=n.libraryPodcastsCount;return}a.value=await e.getLibraryPodcastsCount(t.favoritesOnly||!1)};return u(()=>{const t=e.subscribe(y.MEDIA_ITEM_ADDED,r=>{r.object_id?.startsWith("library://podcast")&&(o.value=!0)});_(t)}),(t,r)=>(b(),f(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":l,"update-available":o.value,title:t.$t("podcasts"),"allow-key-hooks":!0,"show-search-button":!0,icon:"mdi-podcast","restore-state":!0,total:a.value,"extra-menu-items":[{label:"sync_now",icon:"mdi-sync",action:()=>{s(e).startSync([s(v).PODCAST])},overflowAllowed:!0,disabled:s(e).syncTasks.value.length>0}]},null,8,["update-available","title","total","extra-menu-items"]))}});export{F as default};
