import{aa as F,d as j,r as E,b as v,c as s,e as i,k as g,i as l,h as o,u as n,f as S,j as y,m as _,t as B,F as C,E as w}from"./index.0308b213.js";import{g as L}from"./index.cc3a594a.js";const N=()=>F({url:"agent/plugin.keloop.Setting/getSetting"}),T=c=>F({url:"agent/plugin.keloop.Setting/setSetting",method:"POST",data:c}),q=_("\u5F00"),M=_("\u5173"),O=_("\u4EE3\u7406"),P=_("\u63D0\u4EA4"),G=j({setup(c){E([]),E(1);let e=v({open:0,sender:"agent",dev_key:"",dev_secret:"",team_token:"",not_join_sids:[],self_sids:[]});const D=()=>{T(e).then(u=>{w.success("\u8BBE\u7F6E\u6210\u529F"),V()})},V=()=>{N().then(u=>{console.log(u),u&&u.data&&(e.open=u.data.open,e.dev_key=u.data.dev_key,e.dev_secret=u.data.dev_secret,e.team_token=u.data.team_token,e.not_join_sids=u.data.not_join_sids||[],e.self_sids=u.data.self_sids||[])})},r=v({list:[]}),x=u=>{L().then(a=>{r.list=a})};return V(),x(),(u,a)=>{const m=s("el-radio"),k=s("el-radio-group"),d=s("el-form-item"),p=s("el-input"),b=s("el-checkbox"),A=s("el-button"),U=s("el-card");return i(),g(U,{shadow:"always",style:{"margin-top":"20px"}},{default:l(()=>[o(d,{label:"\u5F00\u5173"},{default:l(()=>[o(k,{modelValue:n(e).open,"onUpdate:modelValue":a[0]||(a[0]=t=>n(e).open=t)},{default:l(()=>[o(m,{label:1},{default:l(()=>[q]),_:1}),o(m,{label:0},{default:l(()=>[M]),_:1})]),_:1},8,["modelValue"])]),_:1}),o(d,{label:"\u53D1\u5355\u5BF9\u8C61"},{default:l(()=>[o(k,{modelValue:n(e).sender,"onUpdate:modelValue":a[1]||(a[1]=t=>n(e).sender=t)},{default:l(()=>[o(m,{label:"agent"},{default:l(()=>[O]),_:1})]),_:1},8,["modelValue"])]),_:1}),o(d,{label:"\u5F00\u53D1\u8005\u5BC6\u94A5"},{default:l(()=>[o(p,{modelValue:n(e).dev_key,"onUpdate:modelValue":a[2]||(a[2]=t=>n(e).dev_key=t)},null,8,["modelValue"])]),_:1}),o(d,{label:"\u7B7E\u540D\u5BC6\u94A5"},{default:l(()=>[o(p,{modelValue:n(e).dev_secret,"onUpdate:modelValue":a[3]||(a[3]=t=>n(e).dev_secret=t)},null,8,["modelValue"])]),_:1}),o(d,{label:"\u56E2\u961Ftoken"},{default:l(()=>[o(p,{modelValue:n(e).team_token,"onUpdate:modelValue":a[4]||(a[4]=t=>n(e).team_token=t)},null,8,["modelValue"])]),_:1}),o(d,{label:"\u4E0D\u53C2\u4E0E\u7684\u5546\u6237"},{default:l(()=>[(i(!0),S(C,null,y(n(r).list,t=>(i(),g(b,{modelValue:n(e).not_join_sids,"onUpdate:modelValue":a[5]||(a[5]=f=>n(e).not_join_sids=f),key:t.id,label:t.id},{default:l(()=>[_(B(t.title),1)]),_:2},1032,["modelValue","label"]))),128))]),_:1}),o(d,{label:"\u81EA\u884C\u53D1\u5355\u7684\u5546\u6237"},{default:l(()=>[(i(!0),S(C,null,y(n(r).list,t=>(i(),g(b,{modelValue:n(e).self_sids,"onUpdate:modelValue":a[6]||(a[6]=f=>n(e).self_sids=f),key:t.id,label:t.id},{default:l(()=>[_(B(t.title),1)]),_:2},1032,["modelValue","label"]))),128))]),_:1}),o(d,{label:"",class:"continer-item"},{default:l(()=>[o(A,{type:"primary",onClick:D},{default:l(()=>[P]),_:1})]),_:1})]),_:1})}}});export{G as default};
