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