import{x as e,l as a,cm as s,az as l}from"./utils-lib.js?v=20260328163632";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang5.js?v=20260328163632";import{n as r,g as o}from"./database.js?v=20260328163632";import{r as u,c as n,k as p,o as m,V as d,_ as i,a3 as c,O as v,Y as _,X as b,Z as f,N as y,j as x}from"./base-lib.js?v=20260328163632";import{e as j,b as V,B as g}from"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";const h=u({});n((()=>{var e;return(null==(e=h.value)?void 0:e.status)||!1}));const q=u("server"),C=u("0"),k=async e=>{if(q.value=e,"port"===q.value)z()},w=async()=>{e({loading:a("正在保存，请稍候..."),request:r({db_type:"sqlserver",port:Number(C.value)}),message:!0,success:e=>{z()}})},z=async()=>{e({request:o({db_type:"sqlserver"}),success:e=>{C.value=e.data.port}})},U={class:"flex text-[var(--text-color-2)] items-center"},D=p({__name:"index",props:{compData:{default:{}}},setup(e){const r=e;return m((()=>{h.value=r.compData,k("server")})),(e,r)=>{const o=j,u=V,n=g;return d(),i(_(l),{modelValue:_(q),"onUpdate:modelValue":r[2]||(r[2]=e=>y(q)?q.value=e:null),type:"card",placement:"left",onChange:_(k)},{default:c((()=>[v(o,{name:"server",tab:_(s)(_(a)("服务")),"display-directive":"show:lazy"},{default:c((()=>[v(t,{tab:_(q),modelValue:_(h).status,"onUpdate:modelValue":r[0]||(r[0]=e=>_(h).status=e),name:"sqlserver"},null,8,["tab","modelValue"])])),_:1},8,["tab"]),v(o,{name:"port",tab:_(s)(_(a)("端口")),"display-directive":"show:lazy"},{default:c((()=>[b("div",U,[b("span",null,f(_(a)("端口")),1),v(u,{class:"mx-[12px] !w-160px",value:_(C),"onUpdate:value":r[1]||(r[1]=e=>y(C)?C.value=e:null),placeholder:_(a)("请输入端口")},null,8,["value","placeholder"]),v(n,{type:"primary",onClick:_(w)},{default:c((()=>[x(f(_(a)("保存")),1)])),_:1},8,["onClick"])])])),_:1},8,["tab"])])),_:1},8,["modelValue","onChange"])}}});export{D as default};
