import{_ as u,f}from"./ItemsListing.vue_vue_type_style_index_0_lang-3c57f819.js";import{_ as v,a as _}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-f7de8b21.js";import{l as h,r as y,w,y as a,I as V,j as k,z as m,H as n,D as I,L as s}from"./index-d8f9df52.js";import{n as g}from"./utils-9f654e0f.js";import"./ListviewItem-c40e4501.js";import"./ListItem-7f13d5f5.js";import"./VImg-4a7a1cb8.js";import"./VMenu-7da753a3.js";import"./VTooltip-c8363108.js";import"./VCheckboxBtn-a71f5d8b.js";import"./PanelviewItem.vue_vue_type_style_index_0_lang-7cb7ae2f.js";import"./VCard-45095a4d.js";import"./contextmenu-4e7016bd.js";import"./eventbus-d154090d.js";import"./Alert-6364676b.js";import"./Container-e16d8739.js";/* empty css              */import"./VToolbar-2e81aa20.js";import"./VTextField-98808566.js";import"./VBadge-e81619d5.js";import"./VRow-d7ad6808.js";import"./VVirtualScroll-fd913adb.js";import"./layout-609b1d14.js";import"./VDialog-c52f4549.js";const R=I("br",null,null,-1),W=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(),V("section",null,[k(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{W as default};
