import{I as c}from"./ItemsListing-B7YbZVJx.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_script_setup_true_lang-CRKZ9qLr.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,at as k}from"./index-CbqyiSMI.js";import"./VCheckbox-Csgo84SF.js";import"./eventbus-obT-FP9Y.js";import"./VListItem-BYxrnyeM.js";import"./VCheckboxBtn-DxTJLbWV.js";import"./VList-2BQBE8QJ.js";import"./VCardText-_gwoREqT.js";import"./VCard-B6sm4saY.js";import"./VMenu-1DOA9SEI.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListItem-B7bHYA4R.js";import"./Button-CLDMkOkF.js";import"./VSpacer-CmYIZFzH.js";/* empty css              */import"./PanelviewItemCompact-Dd6pj0K-.js";import"./VAlert-DwqXkxqj.js";import"./Container-w-OCNvyc.js";import"./Toolbar-acHr9fKA.js";import"./VToolbar-BG8y1FYY.js";import"./VTextField-BgfrdRes.js";import"./VInfiniteScroll-DYhI3uXA.js";import"./layout-CR-LchnQ.js";import"./VVirtualScroll-ChC1ngc2.js";import"./VDialog-CqakStlV.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};
