import{I as p}from"./ItemsListing-CQpOLGRS.js";import{Q as u,x as n,a2 as l,o as y,a4 as e,aS as _,b as f,R as b,a0 as s,a5 as v,S as h}from"./index-fwvaH--B.js";import"./MediaItemThumb-_Z3Un5t2.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-BiMgz_MX.js";import"./VChip-BCIwyvQe.js";import"./VBtn-qGPp9gJJ.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-C2iudpSn.js";import"./VCheckbox-CmhfyOud.js";import"./VCheckboxBtn-CaqydlJP.js";import"./PanelviewItemCompact-BFmaxOBL.js";import"./VSpacer-D3XPjzky.js";/* empty css              */import"./Container-DiMv9Yc_.js";import"./VContainer-DY0l0ioq.js";import"./Toolbar-Cn7SFj3T.js";import"./VToolbar-QIxAeXaq.js";import"./VTextField-CHzipJoO.js";import"./VInfiniteScroll-8QYkpqfJ.js";import"./layout-DnNTAqwd.js";import"./VRow-DBi-KQgn.js";import"./VVirtualScroll-CxdHS98G.js";import"./VAlert-D5d2U31U.js";const z=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"],m=async function(t){return a.value=!1,c(t),await e.getLibraryPodcasts(t.favoritesOnly||void 0,t.search,t.limit,t.offset,t.sortBy)},c=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":m,"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{z as default};
