import{I as c}from"./ItemsListing-D0RDJqR8.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CI_qVBO1.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-CQHe9KB5.js";import{n as k}from"./VCheckbox-_eVssUuR.js";import"./eventbus-CxBHXMjo.js";import"./VListItem-932LEcae.js";import"./ListItem-BlTvbW6N.js";import"./Button-C2tPqXAJ.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VMenu-C_g4AWFG.js";import"./VCard-BBArKN8n.js";import"./VCardText-BC98CPwQ.js";import"./VSpacer-BB-V2OH5.js";/* empty css              */import"./PanelviewItemCompact-C9xC4OzX.js";import"./VAlert-CgwdfNK_.js";import"./Container-D0GZf7eO.js";import"./Toolbar-Bxz1a-Vc.js";import"./VToolbar-AihbUtg2.js";import"./VList-SeV0eskX.js";import"./VTextField-DJj81lxi.js";import"./VCheckboxBtn-WpBm-DQx.js";import"./VInfiniteScroll-tYOoNmCo.js";import"./layout-BxB_31nW.js";import"./VVirtualScroll-qRehF0qb.js";import"./VDialog-pSjwSbGd.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};
