import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,f as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{By as s,CE as c,aS as l,wE as u}from"./loadAgentsDir-C_wFhytF.js";var d=e(t(),1);i(),u(),s();var f=o();function p({channels:e,onAccept:t}){let[i,o]=d.useState(null);d.useEffect(()=>{if(i!==null){let e=i,t=setTimeout(()=>c(e));return()=>clearTimeout(t)}},[i]);function s(e){switch(e){case`accept`:t();break;case`exit`:o(1);break}}let u=(0,d.useCallback)(()=>{o(0)},[]);return i===null?(0,f.jsxs)(r,{title:`WARNING: Loading development channels`,color:`error`,onCancel:u,children:[(0,f.jsxs)(a,{flexDirection:`column`,gap:1,children:[(0,f.jsx)(n,{children:`--dangerously-load-development-channels is for local channel development only. Do not use this option to run channels you have downloaded off the internet.`}),(0,f.jsx)(n,{children:`Please use --channels to run a list of approved channels.`}),(0,f.jsxs)(n,{dimColor:!0,children:[`Channels:`,` `,e.map(e=>e.kind===`plugin`?`plugin:${e.name}@${e.marketplace}`:`server:${e.name}`).join(`, `)]})]}),(0,f.jsx)(l,{options:[{label:`I am using this for local development`,value:`accept`},{label:`Exit`,value:`exit`}],onChange:e=>s(e)})]}):null}export{p as DevChannelsDialog};