import{c as a,r as s,q as e,H as l,I as t,y as o,v as n,x as i,z as r,e as m,Q as p,B as c,C as u,G as d}from"./base-lib.js?v=1761009159";import{P as v,ax as _,_ as b}from"./utils-lib.js?v=1761009159";import{az as f,bv as y}from"./firewall.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";const P={class:"p-[2rem]"},j={class:"sn-test-line"},H={class:"sn-test-line-content"},g=b(a({__name:"simulate-attack",props:{compData:{type:Function}},emits:["close"],setup(a,{emit:b}){const g=a,w=b,x=s(!1),q=s(""),V=s([]),h=async()=>{await v({loading:"正在模拟攻击，预计等待一分钟，请稍候...",request:y({version:q.value}),message:!0}),g.compData(),w("close")};return e(()=>(async()=>{V.value=[],await v({loading:x,request:f(),data:{php_versions:[Array,a=>{V.value=a.map(a=>({label:a.version,value:a.v}))}]}})})()),(a,s)=>{const e=_,v=d,b=l("bt-loading");return t((n(),i("div",P,[r("div",j,[s[3]||(s[3]=r("div",{class:"sn-test-line-title"},"1.选择一个PHP版本进行模拟攻击（预计一分钟）",-1)),r("div",H,[s[2]||(s[2]=r("span",null,"PHP版本",-1)),m(e,{modelValue:o(q),"onUpdate:modelValue":s[0]||(s[0]=a=>p(q)?q.value=a:null),options:o(V),class:"ml-[2rem] !w-[155px]",placeholder:"请选择PHP版本"},null,8,["modelValue","options"]),m(v,{class:"!ml-[1rem]",type:"primary",onClick:h},{default:c(()=>s[1]||(s[1]=[u("模拟攻击",-1)])),_:1,__:[1]})])])])),[[b,o(x)]])}}}),[["__scopeId","data-v-ab4f4e7a"]]);export{g as default};
