import{I as c}from"./ItemsListing-BwjD1tmq.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-B-vwm4W9.js";import{d as h,r as y,K as I,c as a,h as g,f as w,e as m,j as n,g as V,b as s}from"./index-CLKg64ON.js";import{n as k}from"./VCheckbox-CpTv3BhW.js";import"./eventbus-D-xzWv8v.js";import"./VListItem-B_TSjQ1y.js";import"./ListItem-f79Nhqh7.js";import"./Button-F8l3l_P8.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VMenu-CLSWQG_U.js";import"./VCard-BaRPabiE.js";import"./VCardText-BAUfdzDA.js";import"./VSpacer-CqqJVVs3.js";/* empty css              */import"./PanelviewItemCompact-CM48-dMH.js";import"./VAlert-CCGDAWu2.js";import"./Container-ZPskS02H.js";import"./Toolbar-BaIn3BvJ.js";import"./VToolbar-DSn0RyUD.js";import"./VList-BvG6-yh2.js";import"./VTextField-C1QkMZRy.js";import"./VCheckboxBtn-DXJHHMHd.js";import"./VInfiniteScroll-pn5EaZ8a.js";import"./layout-CYdR31l5.js";import"./VVirtualScroll-DKBgr9yN.js";import"./VDialog-BpGrcp5y.js";const W=h({__name:"RadioDetails",props:{itemId:{},provider:{}},setup(p){const t=p,e=y(),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(),g("section",null,[w(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),r[0]||(r[0]=V("br",null,null,-1)),e.value?(a(),m(v,{key:1,"item-details":e.value},null,8,["item-details"])):n("",!0)]))}});export{W as default};
