import{l as C,r as g,w as L,q as s,y as _,j as i,x as r,v as p,F as N,z as $,M as v,L as B,O as m,ai as D,K as h,N as u,A as R,ah as T}from"./index-a5bb9833.js";import{_ as x,f as z}from"./ItemsListing.vue_vue_type_script_setup_true_lang-83c47556.js";import{_ as F}from"./InfoHeader.vue_vue_type_style_index_0_lang-ffdc6f99.js";import{C as V,L as S,a as j}from"./Container-4773c160.js";import{V as q}from"./VToolbar-b79315e8.js";import{V as A}from"./VDivider-df9414f0.js";import{V as E}from"./VMenu-240a4406.js";import{a as K}from"./VCard-04ae357c.js";import{l as O}from"./VBtn-629f5316.js";import"./ListviewItem-e2342ce8.js";import"./MediaItemThumb.vue_vue_type_style_index_0_lang-a35ce75a.js";import"./VDialog-667c0916.js";import"./VListItem-39677d21.js";import"./VSelect-4d69c543.js";/* empty css                             */import"./PanelviewItem.vue_vue_type_style_index_0_lang-d218249a.js";import"./Alert-a5ce795e.js";import"./VBadge-f7d58168.js";import"./VRow-7d86481a.js";/* empty css              */import"./layout-ff13c6fd.js";const P=B("br",null,null,-1),pe=C({__name:"RadioDetails",props:{itemId:{},provider:{}},setup(y){const o=y,a=g(),w=async function(){a.value=await m.getRadio(o.itemId,o.provider)};L(()=>o.itemId,e=>{e&&w()},{immediate:!0});const k=async function(e,c,n,t,f=!0){const d=[];if(o.provider=="library"){const l=await m.getRadioVersions(o.itemId,o.provider);d.push(...l)}for(const l of D(a.value)){const I=await m.getRadioVersions(l.item_id,l.provider_instance);d.push(...I)}return z(d,e,c,n,t,f)},b=function(e){window.open(e,"_blank")};return(e,c)=>(s(),_("section",null,[i(F,{item:a.value},null,8,["item"]),i(V,null,{default:r(()=>[i(x,{itemtype:"radioversions","parent-item":a.value,"show-provider":!0,"show-favorites-only-filter":!1,"show-library":!1,"show-radio-number":!1,"show-duration":!1,"load-data":k,"sort-keys":["provider","sort_name"],title:e.$t("other_versions"),"hide-on-empty":!0,checksum:e.provider+e.itemId},null,8,["parent-item","title","checksum"]),P,e.provider=="library"?(s(),p(K,{key:0,style:{"margin-bottom":"10px"}},{default:r(()=>[i(q,{color:"transparent",title:e.$t("mapped_providers"),style:{height:"55px"}},null,8,["title"]),i(A),i(V,null,{default:r(()=>[i(E,null,{default:r(()=>{var n;return[(s(!0),_(N,null,$((n=a.value)==null?void 0:n.provider_mappings,t=>(s(),p(S,{key:t.provider_instance},{prepend:r(()=>[i(j,{domain:t.provider_domain,size:30},null,8,["domain"])]),title:r(()=>[h(u(R(m).providerManifests[t.provider_domain].name),1)]),subtitle:r(()=>[h(u(t.item_id)+" | "+u(t.audio_format.content_type)+" bits ",1)]),append:r(()=>[t.url?(s(),p(O,{key:0,variant:"plain",icon:"mdi-open-in-new",onClick:T(f=>b(t.url),["prevent"])},null,8,["onClick"])):v("",!0)]),_:2},1024))),128))]}),_:1})]),_:1})]),_:1})):v("",!0)]),_:1})]))}});export{pe as default};
