import{I as c}from"./ItemsListing-Cd5IBPUO.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-wa_5O_h6.js";import{x as y,r as h,w as I,y as a,D as w,n as V,z as m,K as p,B as g,I as s,ay as k}from"./index-DuDRe8hE.js";import"./ItemContextMenu.vue_vue_type_style_index_0_scoped_ea20d839_lang-Cfo9s-Sj.js";import"./ProviderIcon.vue_vue_type_script_setup_true_lang-CHFYJo9W.js";import"./VListItem-CuoSvcqW.js";import"./VChip-BRQkwjNJ.js";import"./VList-BlpguAX2.js";import"./VCardText-Dn8Yf3BC.js";import"./VCard-Cf5RelEw.js";import"./VMenu-B49kEbTj.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./eventbus-CGRXT3Tn.js";import"./ListItem-xrpNnThP.js";import"./VCheckbox-DBOdVsut.js";import"./VCheckboxBtn-CMIUd74V.js";import"./VTooltip-aHjUkPs6.js";import"./VSpacer-CYzCqmAo.js";/* empty css              */import"./PanelviewItemCompact-BQvk3oJ_.js";import"./Container-CQhyPPl2.js";import"./VContainer-CCoTeKDA.js";import"./Toolbar-CibNv11m.js";import"./VToolbar-Dhcm-C4i.js";import"./VTextField-D5EFKWzi.js";import"./VInfiniteScroll-BaRPR-8K.js";import"./layout-qserhqCM.js";import"./VRow-C-co90yO.js";import"./VVirtualScroll-CdwGYB7u.js";import"./VAlert-sqJ4UeFM.js";import"./marquee_text_sync-DCD_29QD.js";import"./VDialog-BsvLwk-0.js";const te=y({__name:"RadioDetails",props:{itemId:{},provider:{}},setup(n){const t=n,e=h(),l=async function(){e.value=await s.getRadio(t.itemId,t.provider)};I(()=>t.itemId,i=>{i&&l()},{immediate:!0});const d=async function(i){const r=[];if(t.provider=="library"){const o=await s.getRadioVersions(t.itemId,t.provider);r.push(...o)}for(const o of k(e.value)){const u=await s.getRadioVersions(o.item_id,o.provider_instance);r.push(...u)}return r};return(i,r)=>(a(),w("section",null,[V(f,{item:e.value},null,8,["item"]),e.value?(a(),m(c,{key:0,itemtype:"radioversions","parent-item":e.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-library":!1,"show-radio-number":!1,"show-duration":!1,"load-items":d,"sort-keys":["provider","sort_name"],title:i.$t("other_versions"),"hide-on-empty":!0,checksum:i.provider+i.itemId},null,8,["parent-item","title","checksum"])):p("",!0),r[0]||(r[0]=g("br",null,null,-1)),e.value?(a(),m(v,{key:1,"item-details":e.value},null,8,["item-details"])):p("",!0)]))}});export{te as default};
