"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("vue"),_=require("../../_util/BaseInput.js"),$=require("../../_util/classNames.js"),R=require("../../_util/vnode.js"),o=require("../../_util/vue-types/index.js"),g={inputRef:o.default.any,prefixCls:String,id:String,inputElement:o.default.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:o.default.oneOfType([o.default.number,o.default.string]),attrs:o.default.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},z=u.defineComponent({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:g,setup(F){let a=null;const s=u.inject("VCSelectContainerEvent");return()=>{const{prefixCls:w,id:i,inputElement:O,disabled:S,tabindex:B,autofocus:x,autocomplete:I,editable:t,activeDescendantId:M,value:h,onKeydown:v,onMousedown:E,onChange:P,onPaste:q,onCompositionstart:D,onCompositionend:K,onFocus:l,onBlur:r,open:T,inputRef:j,attrs:N}=F;let e=O||u.createVNode(_.default,null,null);const p=e.props||{},{onKeydown:d,onInput:c,onFocus:f,onBlur:y,onMousedown:m,onCompositionstart:C,onCompositionend:b,style:V}=p;return e=R.cloneElement(e,Object.assign({type:"search",...p,id:i,ref:j,disabled:S,tabindex:B,lazy:!1,autocomplete:I||"off",autofocus:x,class:$.default(`${w}-selection-search-input`,e?.props?.class),role:"combobox","aria-expanded":T,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":M,...N,value:t?h:"",readonly:!t,unselectable:t?null:"on",style:{...V,opacity:t?null:0},onKeydown:n=>{v(n),d&&d(n)},onMousedown:n=>{E(n),m&&m(n)},onInput:n=>{P(n),c&&c(n)},onCompositionstart(n){D(n),C&&C(n)},onCompositionend(n){K(n),b&&b(n)},onPaste:q,onFocus:(...n)=>{clearTimeout(a),f&&f(n[0]),l&&l(n[0]),s?.focus(n[0])},onBlur:(...n)=>{a=setTimeout(()=>{y&&y(n[0]),r&&r(n[0]),s?.blur(n[0])},100)}},e.type==="textarea"?{}:{type:"search"}),!0,!0),e}}});exports.default=z;exports.inputProps=g;
