import{I as p}from"./ItemsListing-aL9MZ76p.js";import{Q as u,x as n,a2 as l,o as y,a4 as e,aY as _,b as f,R as b,a0 as s,a5 as v,S as h}from"./index-Dgb2Jv0W.js";import"./MediaItemThumb-D2Qix7b7.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-CCpOk1KB.js";import"./VBtn-DuScqEn1.js";import"./VCheckbox-BbjKAAg2.js";import"./VCheckboxBtn-CmCi1_nS.js";import"./PanelviewItemCompact-CgboC4qO.js";import"./VSpacer-BOxMbL4y.js";/* empty css              */import"./Container-IhJMLZoA.js";import"./VContainer-K2Wdm5wk.js";import"./Toolbar-gvXRuYqR.js";import"./VToolbar-1AtlnPW5.js";import"./VTextField-ERCRwdIS.js";import"./VInfiniteScroll-Dl9nZEbW.js";import"./layout-CJSys-Xi.js";import"./VRow-JDKZEIW_.js";import"./VVirtualScroll-Dsnd1ROl.js";import"./VAlert-D-qqP7Pv.js";const Y=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{Y as default};
