import{I as c}from"./ItemsListing-Dm2I73m8.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-GTHIo5a1.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-BXI2qIml.js";import{n as k}from"./VCheckbox-CHc9r84S.js";import"./eventbus-BJAYFFrB.js";import"./VListItem-BqDOQjsf.js";import"./ListItem-BKs0yHtA.js";import"./Button-B3YUuwUS.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./VMenu-B1bAKgcw.js";import"./VCard-zMIp_65-.js";import"./VCardText-Cn4KBJZu.js";import"./VSpacer-BPlqGA6z.js";/* empty css              */import"./PanelviewItemCompact-CN1qE3EN.js";import"./VAlert-fx710Vuu.js";import"./Container-CyLsZkwx.js";import"./Toolbar-BIkV8o49.js";import"./VToolbar-7C-gZgX7.js";import"./VList-Oj0sJwE3.js";import"./VTextField-B9f9UP4e.js";import"./VCheckboxBtn-D9hm3Yab.js";import"./VInfiniteScroll-BrsQ2CdR.js";import"./layout-DdVnEUE9.js";import"./VVirtualScroll-BfYXPzfs.js";import"./VDialog-CavDLFW2.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};
