import{a0 as q,a1 as R,a9 as U,u as B,v as V,aa as F,b7 as N,H as A,V as C}from"./antd-vtmm7CAy.js";import{f as I,r as K,a2 as g,a9 as b,aa as l,k as a,u,G as o,ae as L}from"./vue-Dl1fzmsf.js";const H={__name:"repository-form",props:{showSubmit:{type:Boolean,default:!1}},setup(y,{expose:w}){const f=I();async function _(){var d;try{return await((d=f.value)==null?void 0:d.validateFields())}catch(e){console.log("Failed:",e)}}const t=K({name:null,url:null,owner:null,approver:null,dateRange:null,type:null});return w({handleSubmit:_}),(d,e)=>{const i=q,s=R,m=U,r=B,p=V,v=F,k=N,x=A,S=C;return g(),b(S,{ref_key:"formRef",ref:f,model:u(t),onSubmit:_},{default:l(()=>[a(v,{class:"form-row",gutter:16},{default:l(()=>[a(m,{lg:6,md:12,sm:24},{default:l(()=>[a(s,{name:"name",rules:[{required:!0,message:"请输入仓库名称"}],label:"仓库名"},{default:l(()=>[a(i,{value:u(t).name,"onUpdate:value":e[0]||(e[0]=n=>u(t).name=n),placeholder:"请输入仓库名称"},null,8,["value"])]),_:1})]),_:1}),a(m,{xl:{span:7,offset:1},lg:{span:8},md:{span:12},sm:24},{default:l(()=>[a(s,{name:"url",rules:[{required:!0,message:"请输入仓库地址"}],label:"仓库地址"},{default:l(()=>[a(i,{value:u(t).url,"onUpdate:value":e[1]||(e[1]=n=>u(t).url=n),placeholder:"请输入仓库地址"},null,8,["value"])]),_:1})]),_:1}),a(m,{xl:{span:9,offset:1},lg:{span:10},md:{span:24},sm:24},{default:l(()=>[a(s,{name:"owner",rules:[{required:!0,message:"请选择管理员"}],label:"仓库管理员"},{default:l(()=>[a(p,{value:u(t).owner,"onUpdate:value":e[2]||(e[2]=n=>u(t).owner=n),placeholder:"请选择管理员"},{default:l(()=>[a(r,{value:"林同学"},{default:l(()=>e[6]||(e[6]=[o(" 林同学 ")])),_:1}),a(r,{value:"张同学"},{default:l(()=>e[7]||(e[7]=[o(" 张同学 ")])),_:1}),a(r,{value:"李同学"},{default:l(()=>e[8]||(e[8]=[o(" 李同学 ")])),_:1})]),_:1},8,["value"])]),_:1})]),_:1})]),_:1}),a(v,{class:"form-row",gutter:16},{default:l(()=>[a(m,{lg:6,md:12,sm:24},{default:l(()=>[a(s,{name:"approver",rules:[{required:!0,message:"请选择审批员"}],label:"审批人"},{default:l(()=>[a(p,{value:u(t).approver,"onUpdate:value":e[3]||(e[3]=n=>u(t).approver=n),placeholder:"请选择审批员"},{default:l(()=>[a(r,{value:"Kirk Lin"},{default:l(()=>e[9]||(e[9]=[o(" Kirk Lin ")])),_:1}),a(r,{value:"Aibayanyu"},{default:l(()=>e[10]||(e[10]=[o(" Aibayanyu ")])),_:1})]),_:1},8,["value"])]),_:1})]),_:1}),a(m,{xl:{span:7,offset:1},lg:{span:8},md:{span:12},sm:24},{default:l(()=>[a(s,{name:"dateRange",rules:[{required:!0,message:"请选择生效日期"}],label:"生效日期"},{default:l(()=>[a(k,{value:u(t).dateRange,"onUpdate:value":e[4]||(e[4]=n=>u(t).dateRange=n),style:{width:"100%"}},null,8,["value"])]),_:1})]),_:1}),a(m,{xl:{span:9,offset:1},lg:{span:10},md:{span:24},sm:24},{default:l(()=>[a(s,{name:"type",rules:[{required:!0,message:"请选择仓库类型"}],label:"仓库类型"},{default:l(()=>[a(p,{value:u(t).type,"onUpdate:value":e[5]||(e[5]=n=>u(t).type=n),placeholder:"请选择仓库类型"},{default:l(()=>[a(r,{value:"公开"},{default:l(()=>e[11]||(e[11]=[o(" 公开 ")])),_:1}),a(r,{value:"私密"},{default:l(()=>e[12]||(e[12]=[o(" 私密 ")])),_:1})]),_:1},8,["value"])]),_:1})]),_:1})]),_:1}),y.showSubmit?(g(),b(s,{key:0},{default:l(()=>[a(x,{"html-type":"submit"},{default:l(()=>e[13]||(e[13]=[o(" Submit ")])),_:1})]),_:1})):L("",!0)]),_:1},8,["model"])}}};export{H as default};
