import{c as e,r as a,o as s,v as r,x as l,e as o,B as m,y as d,ab as u,a9 as p}from"./base-lib.js?v=1761009159";import{P as t,k as n}from"./utils-lib.js?v=1761009159";import{b9 as i}from"./firewall.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";const f={class:"p-2rem"},c=e({__name:"add-user",props:{compData:{default:()=>({})}},setup(e,{expose:c}){const _=e,b=a(),g=s({username:"",password:""}),w={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:8,message:"密码长度不能小于8位"}]};return c({onConfirm:async e=>{await b.value.validate(),await t({loading:"正在创建用户，请稍后...",request:i(g),message:!0}),_.compData.refreshFn(),e()}}),(e,a)=>{const s=n,t=u,i=p;return r(),l("div",f,[o(i,{model:d(g),ref_key:"sshAddUserRef",ref:b,rules:w},{default:m(()=>[o(t,{label:"用户名",prop:"username"},{default:m(()=>[o(s,{modelValue:d(g).username,"onUpdate:modelValue":a[0]||(a[0]=e=>d(g).username=e),placeholder:"请输入用户名"},null,8,["modelValue"])]),_:1}),o(t,{label:"密码",prop:"password"},{default:m(()=>[o(s,{modelValue:d(g).password,"onUpdate:modelValue":a[1]||(a[1]=e=>d(g).password=e),placeholder:"请输入密码",iconType:"refresh"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])}}});export{c as default};
