import{B as e,O as t,T as n,Y as r,cn as i,dt as a,fn as o,j as s,k as c,kt as l,m as u,nn as d,p as f}from"./vue.runtime.esm-bundler-DpGzKKN4.js";import{m as p}from"./vnode-DU8g6Rf7.js";import{n as m,t as h}from"./form-Bb1_iOEA.js";import{t as g}from"./button-CHjzS7b0.js";import{t as _}from"./_plugin-vue_export-helper-CnS4QQza.js";var v={class:`gx-search-bar`},y=s({name:`GxSearchBar`,__name:`GxSearchBar`,props:{modelValue:{default:``},placeholder:{default:`请输入关键字`},searchButtonText:{default:`查询`},clearButtonText:{default:`清空`}},emits:[`update:modelValue`,`search`,`clear`],setup(o,{emit:s}){let _=s;function y(e){_(`update:modelValue`,e)}function b(){e(()=>{_(`search`)})}function x(){_(`update:modelValue`,``),_(`clear`),b()}function S(){_(`update:modelValue`,``),b()}return(e,s)=>(r(),n(`div`,v,[c(l(h),{class:`gx-search-bar__form`,"label-width":`auto`,inline:!0,onSubmit:s[0]||=u(()=>{},[`prevent`])},{default:a(()=>[c(l(m),{class:`!mb-0 !mr-2`},{default:a(()=>[c(l(p),{class:d([`gx-search-bar__input`]),"model-value":o.modelValue,placeholder:o.placeholder,clearable:``,onInput:y,onKeyup:f(b,[`enter`]),onClear:S},null,8,[`model-value`,`placeholder`])]),_:1}),c(l(g),{type:`primary`,bg:``,onClick:u(b,[`stop`])},{default:a(()=>[t(i(o.searchButtonText),1)]),_:1}),c(l(g),{plain:``,onClick:u(x,[`stop`])},{default:a(()=>[t(i(o.clearButtonText),1)]),_:1})]),_:1})]))}}),b=o({default:()=>x}),x=_(y,[[`__scopeId`,`data-v-e8aae7a2`]]);export{b as n,x as t};