import{I as p}from"./ItemsListing-Be0Rl7jr.js";import{Q as u,x as n,a2 as l,o as y,a4 as e,aU as _,b as f,R as b,a0 as s,a5 as v,S as h}from"./index-Bduq4vJM.js";import"./MediaItemThumb-CN4TRL8T.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-B-hzVPBy.js";import"./Button-DDaesvMx.js";import"./VBtn-DWiYTBpb.js";import"./VCheckbox-BiGeI08h.js";import"./VCheckboxBtn-DLibXb0-.js";import"./PanelviewItemCompact-C9loINH4.js";import"./VSpacer-BnmXZ56R.js";/* empty css              */import"./Container-Ps6BlEWu.js";import"./VContainer-BVUS8uFb.js";import"./Toolbar-MtNZFNYL.js";import"./VToolbar-CG7bivmQ.js";import"./VTextField-lpT7m_Xn.js";import"./VInfiniteScroll-Ar7Xm9mt.js";import"./layout-B2wBEHPQ.js";import"./VRow-Cj9YdJtG.js";import"./VVirtualScroll-VdTkqEkN.js";import"./VAlert-BjDi0iTj.js";const q=u({name:"Podcasts",__name:"LibraryPodcasts",setup(w){const a=n(!1),o=n(l.libraryPodcastsCount),d=["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"],c=async function(t){return a.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){o.value=l.libraryPodcastsCount;return}o.value=await e.getLibraryPodcastsCount(t.favoritesOnly||!1)};return y(()=>{const t=e.subscribe(_.MEDIA_ITEM_ADDED,r=>{var i;(i=r.object_id)!=null&&i.startsWith("library://podcast")&&(a.value=!0)});f(t)}),(t,r)=>(h(),b(p,{itemtype:"podcasts",path:"librarypodcasts","show-duration":!1,"show-provider":!0,"show-favorites-only-filter":!0,"load-paged-data":c,"show-library":!0,"sort-keys":d,"update-available":a.value,title:t.$t("podcasts"),"allow-key-hooks":!0,"show-search-button":!0,icon:"mdi-podcast","restore-state":!0,total:o.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{q as default};
