System.register(["./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./common-legacy.js?v=1763625242172","./__commonjsHelpers__-legacy.js?v=1763625242172","./public-legacy.js?v=1763625242172"],(function(e,a){"use strict";var s,l,t,c,n,i,o,r,u,p,d,m,_,f,v,b,x,y,g,h,w;return{setters:[e=>{s=e._},e=>{l=e.fz,t=e.fA,c=e.c,n=e.h},e=>{i=e.k,o=e.P,r=e.r,u=e.e,p=e.R,d=e.a2,m=e.a3,_=e.X,f=e.U,v=e.V,b=e.an,x=e.N},e=>{y=e.dV,g=e.dP,h=e.au,w=e.dj},null,null,null],execute:function(){const a={class:"w-280px"},j={class:"w-280px"};e("default",i({__name:"index",props:{row:{}},setup(e,{expose:i}){const A=e,{row:D}=A,{t:R}=o(),k=r(null),U=u({dataAccess:"127.0.0.1",access:"127.0.0.1",ssl:""}),$=r([{label:R("Database.form.index_12"),value:"127.0.0.1"},{label:R("Database.form.index_13"),value:"%"},{label:R("Database.form.index_14"),value:"ip"}]),E={host:{trigger:["blur","change"],validator:()=>"ip"!==U.dataAccess||""!==U.access.trim()||new Error(R("Database.form.index_19"))}},S=e=>{U.access="ip"===e?"":e};return(async()=>{const{message:e}=await t({name:D.name});c(e)&&("127.0.0.1"!==e.permission&&"%"!==e.permission?(U.dataAccess="ip",U.access=e.permission.split(",").join("\n")):(U.dataAccess=e.permission,U.access=e.permission),U.ssl=n(e.ssl)?e.ssl:"")})(),i({onConfirm:async({hide:e})=>{try{await(k.value?.validate());const a={...x(U),name:D.username,access:"ip"===U.dataAccess?U.access.trim().split("\n").join(","):U.access};await l(x(a)),e()}catch(a){console.error(a)}}}),(e,l)=>{const t=y,c=g,n=h,i=w,o=s;return p(),d(o,{ref_key:"formRef",ref:k,model:v(U),rules:E,class:"px-20px py-24px"},{default:m((()=>[_(c,{label:e.$t("Database.form.index_6"),path:"listen_ip"},{default:m((()=>[f("div",a,[_(t,{value:v(U).dataAccess,"onUpdate:value":[l[0]||(l[0]=e=>v(U).dataAccess=e),S],class:"permission-select",options:v($)},null,8,["value","options"])])])),_:1},8,["label"]),"ip"===v(U).dataAccess?(p(),d(c,{key:0,label:e.$t("Database.form.index_7"),path:"host"},{default:m((()=>[f("div",j,[_(n,{value:v(U).access,"onUpdate:value":l[1]||(l[1]=e=>v(U).access=e),type:"textarea",autosize:{minRows:3,maxRows:3},"input-props":{name:"address"},placeholder:e.$t("Database.form.index_8")},null,8,["value","placeholder"])])])),_:1},8,["label"])):b("",!0),_(c,{label:e.$t("Database.form.index_11"),"show-feedback":!1},{default:m((()=>[_(i,{value:v(U).ssl,"onUpdate:value":l[2]||(l[2]=e=>v(U).ssl=e),class:"ssl-switch","checked-value":"REQUIRE SSL"},null,8,["value"])])),_:1},8,["label"])])),_:1},8,["model"])}}}))}}}));
