import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-DHRwPkTM.js";import{I}from"./ItemsListing-Bd2thLHu.js";import{aw as _,J as m,L as h,a3 as y,aN as o,b9 as b,a4 as w,ax as k,ay as s,o as E,aG as n,az as p,ag as g}from"./index-BeguICWm.js";import"./Toolbar-DMSWIhz4.js";import"./VToolbar-DZP2Ylkv.js";import"./marquee_text_sync-Vcm7FleQ.js";import"./MediaItemThumb-B7Ks6j0U.js";import"./VDialog-3N5CnNiB.js";import"./Container-L7ytxuXf.js";import"./index-kQIztB-E.js";import"./ListItem-DzMz1Zx0.js";import"./Button-BjWxTVGU.js";import"./userPreferences-CVtQlCYs.js";import"./VCheckboxBtn-HpD-UT_z.js";import"./PanelviewItemCompact-YKRtLaLa.js";import"./VInfiniteScroll-aGYTBb1l.js";import"./VVirtualScroll-Vx_hX6dw.js";import"./VAlert-Dkia6PbV.js";const j=_({__name:"PodcastDetails",props:{itemId:{},provider:{}},setup(l){const e=l,i=m(!1),t=m(),d=async function(){t.value=await o.getPodcast(e.itemId,e.provider)};h(()=>e.itemId,a=>{a&&d()},{immediate:!0}),y(()=>{const a=o.subscribe(b.MEDIA_ITEM_UPDATED,r=>{const c=r.data;t.value?.uri==c.uri&&(i.value=!0)});w(a)});const u=async function(a){return await o.getPodcastEpisodes(e.itemId,e.provider)};return(a,r)=>(s(),k(g,null,[E(f,{item:t.value},null,8,["item"]),t.value?(s(),n(I,{key:0,itemtype:"podcastepisodes","parent-item":t.value,"show-provider":!1,"show-library":!1,"show-favorites-only-filter":!1,"show-track-number":!0,"show-refresh-button":!0,"load-items":u,"sort-keys":["position","position_desc","name","duration","duration_desc"],"update-available":i.value,title:a.$t("podcast_episodes"),"allow-key-hooks":!0,path:`podcast.${e.itemId}.${e.provider}`,"restore-state":!0,"no-server-side-sorting":!0},null,8,["parent-item","update-available","title","path"])):p("",!0),t.value?(s(),n(v,{key:1,"item-details":t.value},null,8,["item-details"])):p("",!0)],64))}});export{j as default};
