import{I as v,_ as I}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-BZiqzrb_.js";import{I as _}from"./ItemsListing-D3F_TSJ9.js";import{Q as h,x as p,w as b,o as w,a4 as o,aY as y,b as k,Z as E,B as D,R as n,a9 as l,G as g,S as i}from"./index-3f0SzJ2S.js";import"./MediaItemThumb-C26TtLO-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-CEkhu7Sx.js";import"./VToolbar-DoPcaYhd.js";import"./VBtn-uN_lnB_i.js";import"./marquee_text_sync-Cqntodbd.js";import"./VDialog-Bun715YU.js";import"./layout-_TuXWF3p.js";import"./ListItem-By07gBmC.js";import"./Container-VBTX9OtT.js";import"./VContainer-BABs2aIQ.js";/* empty css              */import"./VCheckbox-D_eT7Jge.js";import"./VCheckboxBtn-BzQlSWTV.js";import"./PanelviewItemCompact-CPTiJZhD.js";import"./VSpacer-DVJuiJX1.js";import"./VTextField-B24z68Vz.js";import"./VInfiniteScroll-OXEk2rqi.js";import"./VRow-_-hzI20N.js";import"./VVirtualScroll-MESxwZ40.js";import"./VAlert-CKXX9A8o.js";const K=h({__name:"PodcastDetails",props:{itemId:{},provider:{}},setup(d){const t=d,r=p(!1),e=p(),u=async function(){e.value=await o.getPodcast(t.itemId,t.provider)};b(()=>t.itemId,a=>{a&&u()},{immediate:!0}),w(()=>{const a=o.subscribe(y.MEDIA_ITEM_UPDATED,s=>{var m;const f=s.data;((m=e.value)==null?void 0:m.uri)==f.uri&&(r.value=!0)});k(a)});const c=async function(a){return await o.getPodcastEpisodes(t.itemId,t.provider)};return(a,s)=>(i(),E(g,null,[D(v,{item:e.value},null,8,["item"]),e.value?(i(),n(_,{key:0,itemtype:"podcastepisodes","parent-item":e.value,"show-provider":!1,"show-library":!1,"show-favorites-only-filter":!1,"show-track-number":!0,"show-refresh-button":!0,"load-items":c,"sort-keys":["position","position_desc","name","duration","duration_desc"],"update-available":r.value,title:a.$t("podcast_episodes"),"allow-key-hooks":!0,path:`podcast.${t.itemId}.${t.provider}`,"restore-state":!0,"no-server-side-sorting":!0},null,8,["parent-item","update-available","title","path"])):l("",!0),e.value?(i(),n(I,{key:1,"item-details":e.value},null,8,["item-details"])):l("",!0)],64))}});export{K as default};
