var e=(e,a,s)=>new Promise((l,t)=>{var r=e=>{try{n(s.next(e))}catch(a){t(a)}},u=e=>{try{n(s.throw(e))}catch(a){t(a)}},n=e=>e.done?l(e.value):Promise.resolve(e.value).then(r,u);n((s=s.apply(e,a)).next())});import{_ as a}from"./index-B5zmPfFG.js";import{q as s,bI as l,r as t,c as r,R as u,D as n,v as o}from"./vendor-core-Di0OO4oJ.js";const p=s({__name:"user-search",props:{modelValue:{}},emits:["update:modelValue","search","reset"],setup(s,{emit:p}){const{t:m}=l(),i=s,y=p,c=t(),d=r({get:()=>i.modelValue,set:e=>y("update:modelValue",e)}),h={},v=t([]);u(()=>e(null,null,function*(){v.value=yield new Promise(e=>{setTimeout(()=>{e([{label:m("system.userManage.normal"),value:"1"},{label:m("system.userManage.banned"),value:"0"}])},1e3)})}));const g=r(()=>[{label:"ID",key:"userId",type:"input",props:{placeholder:"请输入用户ID",clearable:!0}},{label:m("system.userManage.username"),key:"userName",type:"input",props:{placeholder:m("system.userManage.inputUsername"),clearable:!0}},{label:m("system.userManage.phone"),key:"userPhone",type:"input",props:{placeholder:m("system.userManage.inputPhone"),maxlength:"11"}},{label:m("system.userManage.email"),key:"userEmail",type:"input",props:{placeholder:m("system.userManage.inputEmail")}},{label:m("system.userManage.shop"),key:"shopName",type:"input",props:{placeholder:m("system.userManage.inputShop")}},{label:m("system.userManage.realNameStatus"),key:"realNameStatus",type:"select",props:{placeholder:m("system.userManage.selectRealNameStatus"),options:[{label:m("system.userManage.unverified"),value:"0"},{label:m("system.userManage.verified"),value:"1"},{label:m("system.userManage.pending"),value:"2"}]}},{label:m("system.userManage.status"),key:"status",type:"select",props:{placeholder:m("system.userManage.selectStatus"),options:v.value}}]);function M(){y("reset")}function b(){return e(this,null,function*(){yield c.value.validate(),y("search",d.value)})}return(e,s)=>{const l=a;return o(),n(l,{ref_key:"searchBarRef",ref:c,modelValue:d.value,"onUpdate:modelValue":s[0]||(s[0]=e=>d.value=e),items:g.value,rules:h,onReset:M,onSearch:b},null,8,["modelValue","items"])}}});export{p as _};
