import{I as m}from"./ItemsListing-t4zttHcu.js";import{U as p,x as i,a4 as n,o as u,a6 as e,aY as y,b as _,W as f,X as b,a2 as s,a7 as v}from"./index-B-lUZalq.js";import"./Container-Br6JH6Pm.js";import"./Button-kSJGA_Pw.js";import"./VBtn-BPJ1JKW-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VContainer-DB65WVbe.js";/* empty css              */import"./Toolbar-BvxWbi_E.js";import"./VToolbar-RljK0PC9.js";import"./ListItem-LV_WU--g.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DnroVGI-.js";import"./VInput-BWBQqjuk.js";import"./MediaItemThumb-DapaMoP4.js";import"./PanelviewItemCompact-CIDxIfoQ.js";import"./VSpacer-DDLrofv-.js";import"./VTextField-B-d5Pe9I.js";import"./VInfiniteScroll-CKZj-VKd.js";import"./layout-BuzUTwrQ.js";import"./VRow-BQOTE9C_.js";import"./VVirtualScroll-CceW16X7.js";import"./VAlert-QHTIcuEJ.js";const $=p({name:"Podcasts",__name:"LibraryPodcasts",setup(h){const a=i(!1),o=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 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=n.libraryPodcastsCount;return}o.value=await e.getLibraryPodcastsCount(t.favoritesOnly||!1)};return u(()=>{const t=e.subscribe(y.MEDIA_ITEM_ADDED,r=>{r.object_id?.startsWith("library://podcast")&&(a.value=!0)});_(t)}),(t,r)=>(b(),f(m,{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":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{$ as default};
