import{a4 as r,ai as B,d as L,aj as D,al as $,r as d,o as g,a6 as V,a9 as c,a7 as s,a8 as t,ac as A,ao as j,ad as I,c as x,ak as b,af as G}from"./vendor.e9cda63f.js";import{F as O}from"./index.43d299e0.js";import{g as C}from"./gm.616963af.js";import{_ as S,o as E,n as N}from"./index.fdd4233a.js";import"./pagination.392a2bfd.js";const k=r(!1),l=B({server_id:"",nick_name:""}),R=r(3),T=L({name:"OpenGameLevel",components:{Footer:O},setup(){D();const o=r(),n=r(),F="100px",h={children:"children",label:"label"},y=r(),_=r(3);$("logType",_);const i=()=>{C.getServerInfo().then(e=>{o.value=e.data.data,l.server_id=o.value[0].id,console.log(o.value)})},f=e=>{l.server_id=e,console.log(l)},u=()=>{if(l.nick_name==""){E("\u73A9\u5BB6\u6635\u79F0\u4E0D\u53EF\u4E3A\u7A7A!");return}const e=j.service({lock:!0,text:"\u52A0\u8F7D\u4E2D...",background:"rgba(0, 0 ,0 ,0.7)"});C.OpenGameLevel(l).then(a=>{a.code==200?(e.close(),N(a.message)):(e.close(),E(a.message))})},p=()=>{l.server_id="",l.nick_name="",i()},m=()=>{k.value=!1},v=(e,a)=>{a==null||a.id,k.value=!0};return i(),{useI18n:D,defaultProps:h,serverForm:n,logType:_,RefChild:y,radio:R,form:l,serverInfo:o,changeServerID:f,cancle:m,open:v,dialogVisible:k,formLabelWidth:F,submitForm:u,resetForm:p}}}),M=c("br",null,null,-1),U={class:"el_form"},P={class:"select_server"},W={class:"submit_style"},q=b("\u63D0\u4EA4"),z=b("\u91CD\u7F6E");function H(o,n,F,h,y,_){const i=d("el-radio"),f=d("el-radio-group"),u=d("el-form-item"),p=d("el-input"),m=d("el-button"),v=d("el-form");return g(),V(A,null,[M,c("div",U,[s(v,{ref:"ruleFormRef",model:o.form,"label-width":"120px",style:{"max-width":"560px"}},{default:t(()=>[s(u,{label:"\u533A\u670D\u9009\u62E9"},{default:t(()=>[c("div",P,[(g(!0),V(A,null,I(o.serverInfo,e=>(g(),x(f,{modelValue:o.form.server_id,"onUpdate:modelValue":n[0]||(n[0]=a=>o.form.server_id=a),key:e.id,onChange:a=>o.changeServerID(e.id)},{default:t(()=>[s(i,{class:"server_name",label:e.id},{default:t(()=>[b(G(e.name),1)]),_:2},1032,["label"])]),_:2},1032,["modelValue","onChange"]))),128))])]),_:1}),s(u,{label:"\u73A9\u5BB6\u6635\u79F0"},{default:t(()=>[s(p,{modelValue:o.form.nick_name,"onUpdate:modelValue":n[1]||(n[1]=e=>o.form.nick_name=e)},null,8,["modelValue"])]),_:1}),s(u,null,{default:t(()=>[c("div",W,[s(m,{type:"primary",onClick:n[2]||(n[2]=e=>o.submitForm())},{default:t(()=>[q]),_:1}),s(m,{onClick:n[3]||(n[3]=e=>o.resetForm())},{default:t(()=>[z]),_:1})])]),_:1})]),_:1},8,["model"])])],64)}var Z=S(T,[["render",H]]);export{Z as default};
