import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CK74LmSM.js";import{I}from"./ItemsListing-ck1RuJ2A.js";import{ay as _,J as m,L as h,a3 as b,aP as o,bb as y,a4 as k,az as w,aA as s,o as E,aI as p,aB as n,ah as D}from"./index-It2prjj_.js";import"./Toolbar-B4cAstji.js";import"./VToolbar-d3S4vzQ8.js";import"./marquee_text_sync-Ddmp1DYu.js";import"./MediaItemThumb-7RT8HKcH.js";import"./VDialog-iiGPeNfY.js";import"./Container-DVHdDHGo.js";import"./index-kQIztB-E.js";import"./ListItem-CZP-Ank1.js";import"./Button-BMZw2h0c.js";import"./userPreferences-D5hXrNCo.js";import"./VCheckboxBtn-CeJlTA3J.js";import"./VSelectionControl-B-NDe8ob.js";import"./PanelviewItemCompact-D2-QnU9K.js";import"./VInfiniteScroll-C95z5bNw.js";import"./VVirtualScroll-OOfSuXB2.js";import"./VAlert-C9ByNQuJ.js";const G=_({__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}),b(()=>{const a=o.subscribe(y.MEDIA_ITEM_UPDATED,r=>{const c=r.data;t.value?.uri==c.uri&&(i.value=!0)});k(a)});const u=async function(a){return await o.getPodcastEpisodes(e.itemId,e.provider)};return(a,r)=>(s(),w(D,null,[E(f,{item:t.value},null,8,["item"]),t.value?(s(),p(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"])):n("",!0),t.value?(s(),p(v,{key:1,"item-details":t.value},null,8,["item-details"])):n("",!0)],64))}});export{G as default};
