import{I as c}from"./ItemsListing-DWzn5l67.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CgqIxdYx.js";import{Q as h,x as w,w as y,Z as I,B as V,R as m,a9 as n,W as g,S as a,a4 as s,bi as k}from"./index-DdI--Yet.js";import"./MediaItemThumb-DHcqTVjl.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-D41gG9IS.js";import"./VChip-BBcriFso.js";import"./VBtn-g6NhQ7fK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-BK1DMsnV.js";import"./VCheckbox-B4YfxJ0R.js";import"./VCheckboxBtn-BWCQ3DqN.js";import"./PanelviewItemCompact-kTIN1Q1A.js";import"./VSpacer-DDLLNEUh.js";/* empty css              */import"./Container-B4zACZDu.js";import"./VContainer-BtdP8B7E.js";import"./Toolbar-BGUFqu6B.js";import"./VToolbar-DRvSLcNG.js";import"./VTextField-CkYsZnxG.js";import"./VInfiniteScroll-B6R5NfAO.js";import"./layout-CiO1VcK1.js";import"./VRow-VEN0m6ZM.js";import"./VVirtualScroll-D10a-qpl.js";import"./VAlert-CIZAmx66.js";import"./marquee_text_sync-BWVVy3ud.js";import"./VDialog-Babb4d0Q.js";const O=h({__name:"RadioDetails",props:{itemId:{},provider:{}},setup(p){const t=p,e=w(),l=async function(){e.value=await s.getRadio(t.itemId,t.provider)};y(()=>t.itemId,i=>{i&&l()},{immediate:!0});const d=async function(i){const o=[];if(t.provider=="library"){const r=await s.getRadioVersions(t.itemId,t.provider);o.push(...r)}for(const r of k(e.value)){const u=await s.getRadioVersions(r.item_id,r.provider_instance);o.push(...u)}return o};return(i,o)=>(a(),I("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"])):n("",!0),o[0]||(o[0]=g("br",null,null,-1)),e.value?(a(),m(v,{key:1,"item-details":e.value},null,8,["item-details"])):n("",!0)]))}});export{O as default};
