import{_ as u,f}from"./ItemsListing.vue_vue_type_style_index_0_lang-17edc154.js";import{_ as v,a as _}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-293d6364.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-c2905444.js";import{n as g}from"./utils-a855eb36.js";import"./ListviewItem-90d92dc7.js";import"./ListItem-e72ce29c.js";import"./VImg-ee22af0e.js";import"./VMenu-8ba8f078.js";import"./VTooltip-54e33c2a.js";import"./VCheckboxBtn-020d02eb.js";import"./PanelviewItem.vue_vue_type_style_index_0_lang-74d21d61.js";import"./VCard-a2a52f2b.js";import"./contextmenu-c9d825c5.js";import"./eventbus-d154090d.js";import"./Alert-854e6197.js";import"./Container-920d5187.js";/* empty css              */import"./VToolbar-0b568cf9.js";import"./VTextField-b3baf9d7.js";import"./VBadge-78c551e8.js";import"./VRow-a177c0dd.js";import"./VVirtualScroll-da9f2ada.js";import"./layout-cc3c7cd6.js";import"./VDialog-d570b2c9.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};
