import{I as v,_ as I}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-Bf7qdK33.js";import{I as _}from"./ItemsListing-BGUL9QyB.js";import{x as h,r as p,w as y,o as b,I as a,af as w,b as k,y as r,D,n as E,z as n,K as l,F as g}from"./index-CFvoaD7J.js";import"./eventbus-CGRXT3Tn.js";import"./ProviderIcon.vue_vue_type_script_setup_true_lang-Ji67J6Pu.js";import"./VListItem-CSPID7yq.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_4409cede_lang-41DbVClm.js";import"./VChip-Ccz1-bmn.js";import"./VList-fGk9SRdf.js";import"./VCardText-CpOuj25H.js";import"./VCard-DxLPF-Ra.js";import"./VMenu-9pSrU4Fo.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Toolbar-DNen7a-V.js";import"./VToolbar-Da4d1W_R.js";import"./marquee_text_sync-k18A2BIX.js";import"./VDialog-CdvGeqlS.js";import"./VTooltip-DC73AT2B.js";import"./layout-BeGdxe2Y.js";import"./ListItem-nYGtvGaY.js";import"./Container-BDz3QMuX.js";import"./VContainer-CzfHAKpA.js";/* empty css              */import"./VCheckbox-B5r7QKHZ.js";import"./VCheckboxBtn-CRgZyCzV.js";import"./VSpacer-UYEiyhN7.js";import"./PanelviewItemCompact-BQIsDE0n.js";import"./VTextField-DF4u_eMy.js";import"./VInfiniteScroll-D1yVLjQf.js";import"./VRow-BC1No8oB.js";import"./VVirtualScroll-BDBVEoUv.js";import"./VAlert-CIiIOQza.js";const rt=h({__name:"PodcastDetails",props:{itemId:{},provider:{}},setup(d){const t=d,i=p(!1),e=p(),u=async function(){e.value=await a.getPodcast(t.itemId,t.provider)};y(()=>t.itemId,o=>{o&&u()},{immediate:!0}),b(()=>{const o=a.subscribe(w.MEDIA_ITEM_UPDATED,s=>{var m;const f=s.data;((m=e.value)==null?void 0:m.uri)==f.uri&&(i.value=!0)});k(o)});const c=async function(o){return await a.getPodcastEpisodes(t.itemId,t.provider)};return(o,s)=>(r(),D(g,null,[E(v,{item:e.value},null,8,["item"]),e.value?(r(),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":i.value,title:o.$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?(r(),n(I,{key:1,"item-details":e.value},null,8,["item-details"])):l("",!0)],64))}});export{rt as default};
