import{d as g,e as B}from"./application.d3e99cbb.js";import{F as q}from"./index.d8717905.js";import{d as C,V as S,r as v,c as s,e as i,f as U,h as a,i as u,m as r,t as w,k as m,A as p,F as x,_ as z}from"./index.0308b213.js";const A=r("\u5173\u95ED"),P=r("\u5F00\u542F"),I=r("\u4FDD\u5B58"),N=C({setup(T){const{router:c,route:V}=S(),n=v(V.query.type),e=v({name:"",app_key:"",status:1,sign:"",secret_id:"",app_id:"",secret_key:""}),y=async()=>{e.value=await g({type:n.value})},b=async()=>{await B({...e.value,type:n.value}),c.back()};return n.value&&y(),(E,l)=>{const k=s("el-page-header"),_=s("el-card"),o=s("el-form-item"),f=s("el-radio"),d=s("el-input"),D=s("el-form"),F=s("el-button");return i(),U(x,null,[a(_,{shadow:"never"},{default:u(()=>[a(k,{onBack:l[0]||(l[0]=t=>E.$router.back()),content:"\u77ED\u4FE1\u8BBE\u7F6E"})]),_:1}),a(_,{shadow:"never",class:"m-t-15"},{default:u(()=>[a(D,{ref:"form","label-width":"135px"},{default:u(()=>[a(o,{label:"\u77ED\u4FE1\u6E20\u9053"},{default:u(()=>[r(w(e.value.name),1)]),_:1}),a(o,{label:"\u5F00\u542F\u72B6\u6001",required:""},{default:u(()=>[a(f,{modelValue:e.value.status,"onUpdate:modelValue":l[1]||(l[1]=t=>e.value.status=t),label:typeof e.value.status=="string"?"0":0},{default:u(()=>[A]),_:1},8,["modelValue","label"]),a(f,{modelValue:e.value.status,"onUpdate:modelValue":l[2]||(l[2]=t=>e.value.status=t),label:typeof e.value.status=="string"?"1":1},{default:u(()=>[P]),_:1},8,["modelValue","label"])]),_:1}),a(o,{label:"\u77ED\u4FE1\u7B7E\u540D",size:"mini",required:""},{default:u(()=>[a(d,{class:"ls-input",modelValue:e.value.sign,"onUpdate:modelValue":l[3]||(l[3]=t=>e.value.sign=t)},null,8,["modelValue"])]),_:1}),n.value=="tencent"?(i(),m(o,{key:0,label:"APP_ID",size:"mini",required:""},{default:u(()=>[a(d,{class:"ls-input",modelValue:e.value.app_id,"onUpdate:modelValue":l[4]||(l[4]=t=>e.value.app_id=t)},null,8,["modelValue"])]),_:1})):p("",!0),n.value=="ali"?(i(),m(o,{key:1,label:"APP_KEY",size:"mini",required:""},{default:u(()=>[a(d,{class:"ls-input",modelValue:e.value.app_key,"onUpdate:modelValue":l[5]||(l[5]=t=>e.value.app_key=t)},null,8,["modelValue"])]),_:1})):p("",!0),n.value=="tencent"?(i(),m(o,{key:2,label:"SECRET_ID",size:"mini",required:""},{default:u(()=>[a(d,{class:"ls-input",modelValue:e.value.secret_id,"onUpdate:modelValue":l[6]||(l[6]=t=>e.value.secret_id=t)},null,8,["modelValue"])]),_:1})):p("",!0),a(o,{label:"SECRET_KEY",size:"mini",required:""},{default:u(()=>[a(d,{class:"ls-input",modelValue:e.value.secret_key,"onUpdate:modelValue":l[7]||(l[7]=t=>e.value.secret_key=t)},null,8,["modelValue"])]),_:1})]),_:1},512)]),_:1}),a(q,null,{default:u(()=>[a(F,{type:"primary",size:"small",onClick:l[8]||(l[8]=t=>b())},{default:u(()=>[I]),_:1})]),_:1})],64)}}});const Y=z(N,[["__scopeId","data-v-a4d81bca"]]);export{Y as default};
