import{I as c}from"./ItemsListing-D6AMqIYc.js";import{I as f,_ as v}from"./ProviderDetails.vue_vue_type_style_index_0_lang-ClXR5oFa.js";import{c as a,E as I,B as h}from"./index-CxiRlsCY.js";import{d as y,r as w,w as V,o as b,a0 as g,b as k,e as n,H as _,D as m,I as p,f as D}from"./lucide-C2DU1LFb.js";import"./Container-CwfZ2VgM.js";import"./index-kQIztB-E.js";import"./vuetify-RelkxOq-.js";import"./utils-CDN07tui.js";import"./Toolbar-MwYpbj3t.js";import"./userPreferences-ln7cf3P6.js";import"./vue-router-BgJK_hRC.js";import"./Button-DBt8j7D4.js";import"./ListItem-DzUpG5Dm.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-D7lqdhVg.js";import"./MediaItemThumb-C7OhU3lK.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-C17dV9_V.js";import"./vue-i18n-DySrp6mW.js";import"./PanelviewItemCompact-Cjl_ij1h.js";import"./marquee_text_sync-BtOjTSaq.js";import"./qrcode-DSFhiIp2.js";import"./marked-C0Rlrcoy.js";import"./color-BTziYnFN.js";import"./vueuse-DIaEWNCo.js";/* empty css            */import"./swiper-Jy9GbtzK.js";const X=y({__name:"RadioDetails",props:{itemId:{},provider:{}},setup(s){const o=s,e=w(),l=async function(){e.value=await a.getRadio(o.itemId,o.provider)};V(()=>o.itemId,r=>{r&&l()},{immediate:!0}),b(()=>{const r=a.subscribe(I.MEDIA_ITEM_UPDATED,t=>{const i=t.data;e.value?.uri==i.uri&&(e.value=i)});g(r)});const d=async function(r){const t=[];if(o.provider=="library"){const i=await a.getRadioVersions(o.itemId,o.provider);t.push(...i)}for(const i of h(e.value)){const u=await a.getRadioVersions(i.item_id,i.provider_instance);t.push(...u)}return t};return(r,t)=>(n(),k("section",null,[_(f,{item:e.value},null,8,["item"]),e.value?(n(),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:r.$t("other_versions"),"hide-on-empty":!0,checksum:s.provider+s.itemId},null,8,["parent-item","title","checksum"])):p("",!0),t[0]||(t[0]=D("br",null,null,-1)),e.value?(n(),m(v,{key:1,"item-details":e.value},null,8,["item-details"])):p("",!0)]))}});export{X as default};
