import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import{_ as e}from"./index.vue_vue_type_script_setup_true_lang9.js?v=1753954525509";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang2.js?v=1753954525509";import{c7 as s}from"./page_layout.js?v=1753954525509";import"./public.js?v=1753954525509";import{a as p,b as l}from"./index255.js?v=1753954525509";import{i as r}from"./ftp2.js?v=1753954525509";import{k as n,P as o,r as u,e as d,o as _,U as m,a1 as i,a2 as f,Q as v,W as c,X as h,N as x}from"./vue.js?v=1753954525509";import{aq as w,cA as b}from"./naive.js?v=1753954525509";import"./index96.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";const g={class:"w-330px"},j={class:"w-330px"},y={class:"w-330px"},P=n({__name:"index",props:{data:{}},setup(n,{expose:P}){const A=n,{t:I}=o(),U=s(),F=u(null),$=u(null),k=d({ftp_username:"",ftp_password:"",path:U.addPath,ps:""}),E={path:p(),ftp_password:l({complex:{length:6}}),ftp_username:{trigger:["blur","change"],validator:(a,e)=>0===e.length?new Error(I("Ftp.Add.Index_2")):/^[a-zA-Z0-9_]+$/g.test(e)?!(e.length<3)||new Error(I("Ftp.Add.Index_4")):new Error(I("Ftp.Add.Index_3"))}},R=()=>{const a=k.ftp_username;k.ps=a,a.length>0?k.path=U.addPath+"/"+a:k.path=U.addPath};_((()=>{var a;null==(a=$.value)||a.focus()}));return P({onConfirm:async()=>{var a,e,t;await(null==(a=F.value)?void 0:a.validate()),await r(x(k)),null==(t=null==(e=A.data)?void 0:e.getList)||t.call(e),U.setRefresh(!0)}}),(s,p)=>{const l=w,r=b,n=t,o=e,u=a;return m(),i(u,{ref_key:"formRef",ref:F,model:h(k),rules:E,class:"w-530px px-20px pt-24px pb-12px"},{default:f((()=>[v(r,{label:s.$t("Public.Table.Username"),path:"ftp_username"},{default:f((()=>[c("div",g,[v(l,{value:h(k).ftp_username,"onUpdate:value":p[0]||(p[0]=a=>h(k).ftp_username=a),ref_key:"usernameRef",ref:$,placeholder:"","input-props":{name:"username"},onInput:R},null,8,["value"])])])),_:1},8,["label"]),v(r,{label:s.$t("Public.Table.Password"),path:"ftp_password"},{default:f((()=>[c("div",j,[v(n,{value:h(k).ftp_password,"onUpdate:value":p[1]||(p[1]=a=>h(k).ftp_password=a),placeholder:"","input-props":{name:"password"}},null,8,["value"])])])),_:1},8,["label"]),v(r,{label:s.$t("Ftp.Add.Index_1"),path:"path"},{default:f((()=>[c("div",y,[v(o,{value:h(k).path,"onUpdate:value":p[2]||(p[2]=a=>h(k).path=a),placeholder:"","input-props":{name:"path"}},null,8,["value"])])])),_:1},8,["label"])])),_:1},8,["model"])}}});export{P as default};
