import{_ as u,f}from"./ItemsListing.vue_vue_type_style_index_0_lang-1ef061d8.js";import{_ as v,a as _}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-33f2e42a.js";import{l as h,r as y,w,y as a,I as k,j as V,z as m,H as n,D as I,L as s,ak as g}from"./index-ebe4cd91.js";import"./ListviewItem-5151f17f.js";import"./MediaItemThumb.vue_vue_type_style_index_0_lang-bf2386aa.js";import"./ListItem-a20c73ec.js";import"./VImg-b5692565.js";import"./VMenu-86ca5efe.js";import"./index-bda4e7b4.js";import"./VListItem-0df8c60b.js";import"./VCheckboxBtn-fcc73f36.js";import"./VCard-46ebf6a3.js";/* empty css                             */import"./PanelviewItem.vue_vue_type_style_index_0_lang-516932fb.js";import"./contextmenu-b7cc1c45.js";import"./eventbus-d154090d.js";import"./Alert-d031836e.js";import"./Container-1375a850.js";/* empty css              */import"./VToolbar-76e5fae8.js";import"./VTextField-034239e4.js";import"./VBadge-0ad57746.js";import"./VRow-03e92c8f.js";import"./layout-84ae677b.js";import"./VDialog-ff35ac56.js";const R=I("br",null,null,-1),X=h({__name:"RadioDetails",props:{itemId:{},provider:{}},setup(p){const i=p,e=y(),l=async function(){e.value=await s.getRadio(i.itemId,i.provider)};w(()=>i.itemId,t=>{t&&l()},{immediate:!0});const d=async function(t){const o=[];if(i.provider=="library"){const r=await s.getRadioVersions(i.itemId,i.provider);o.push(...r)}for(const r of g(e.value)){const c=await s.getRadioVersions(r.item_id,r.provider_instance);o.push(...c)}return f(o,t)};return(t,o)=>(a(),k("section",null,[V(v,{item:e.value},null,8,["item"]),e.value?(a(),m(u,{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-data":d,"sort-keys":["provider","sort_name"],title:t.$t("other_versions"),"hide-on-empty":!0,checksum:t.provider+t.itemId},null,8,["parent-item","title","checksum"])):n("",!0),R,e.value?(a(),m(_,{key:1,"item-details":e.value},null,8,["item-details"])):n("",!0)]))}});export{X as default};
