import{v as f,h as a,x as _,F as v,y as h,e as c,H as b,r as m,m as g,q as u,w as y,t as w,B as O}from"./index-BeCeuELg.js";import{c as p}from"./clsx-09a06a12-B-dksMZM.js";import{t as d}from"./i18n-43b7aa72-DSS4ELtF.js";import{n as k}from"./dev.utils-109baad9-BGIjjL5C.js";import{t as x}from"./events-29e84d75-CETYymUM.js";import{g as I}from"./controller-fe4af011-DCaVWhXc.js";import{I as S}from"./InternalUnderlinedBadgeText-f22dc572-BiOzv9aE.js";import{I as V}from"./controller-icon-1d76e1bd-tKWyvUbA.js";import{f as C,b as A}from"./controller-06f2bcc0-CrEafCKk.js";import"./associated.controller-b3473c2a-BVdUJnUP.js";import"./access-and-short-key-f4e18d87-DqWg2s_b.js";import"./hide-label-a27a203c-Dfejlhn8.js";import"./label-3757689e-D7ErDa5R.js";import"./tooltip-align-184e92e1-DetagLgg.js";import"./align-a1976178-CkMi2aRf.js";import"./icons-64d60d4b-nOdEv8ok.js";class E extends V{constructor(t,i,n){super(t,i,n),this.keyOptionMap=new Map,this.afterPatchOptions=(s,l,o,r)=>{r==="_value"&&this.setFormAssociatedValue(s)},this.beforePatchOptions=(s,l)=>{const o=l.has("_options")?l.get("_options"):this.component.state._options;Array.isArray(o)&&o.length>0&&(this.keyOptionMap.clear(),C(this.keyOptionMap,o))},this.component=t}validateOptions(t){A(this.component,t,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(t){u(this.component,"_required",t)}validateValue(t){y(this.component,"_value",i=>i!==void 0,new Set(["StencilUnknown"]),t)}validatePlaceholder(t){w(this.component,"_placeholder",t)}validateHideClearButton(t){u(this.component,"_hideClearButton",t)}validateRows(t){O(this.component,"_rows",t)}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validatePlaceholder(this.component._placeholder),this.validateHideClearButton(this.component._hideClearButton),this.validateRows(this.component._rows)}}const K=`/*
 * This file contains all rules for accessibility.
 */
@layer kol-a11y {
  :host {
    /*
     * Minimum size of interactive elements.
     */
    --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));
    color: black;
    /*
     * No element should be used without a background and font color whose contrast ratio has
     * not been checked. By initially setting the background color to white and the font color
     * to black, the contrast ratio is ensured and explicit adjustment is forced.
     */
    background-color: white;
    /*
     * Verdana is an accessible font that can be used without requiring additional loading time.
     */
    font-family: Verdana;
    /*
     * Letter spacing is required for all texts.
     */
    letter-spacing: inherit;
    /*
     * Word spacing is required for all texts.
     */
    word-spacing: inherit;
  }
  * {
    /*
     * This rule enables the word dividing for all texts. That is important for high zoom levels.
     */
    hyphens: auto;
    /*
     * This rule enables the word dividing for all texts. That is important for high zoom levels.
     */
    word-break: break-word;
  }
  /*
   * All interactive elements should have a minimum size of rem(44).
   */
  /* input:not([type='checkbox'], [type='radio'], [type='range']), */
  /* option, */
  /* select, */
  /* textarea, */
  button,
  .kol-input .input {
    min-width: var(--a11y-min-size);
    min-height: var(--a11y-min-size);
  }
  /*
   * Some interactive elements should not inherit the font-family and font-size.
   */
  a,
  button,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  input,
  option,
  select,
  textarea {
    /*
     * All elements should inherit the font family from his parent element.
     */
    font-family: inherit;
    /*
     * All elements should inherit the font size from his parent element.
     */
    font-size: inherit;
    /*
     * Letter spacing is required for all texts.
     */
    letter-spacing: inherit;
    /*
     * Word spacing is required for all texts.
     */
    word-spacing: inherit;
  }
  /**
  * Sometimes we need the semantic element for accessibility reasons,
  * but we don't want to show it.
  *
  * - https://www.a11yproject.com/posts/how-to-hide-content/
  */
  .visually-hidden {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(50%);
  }
}
@layer kol-global {
  /*
   * Dieses CSS stellt sicher, dass der Standard-Style
   * von A und Button resettet werden.
   */
  :is(a, button) {
    background-color: transparent;
    width: 100%; /* 100% needed for custom width from outside */
    margin: 0;
    padding: 0;
    border: none;
  }
  /*
   * Ensure elements with hidden attribute to be actually not visible
   * @see https://meowni.ca/hidden.is.a.lie.html
   */
  [hidden] {
    display: none !important;
  }
}
@layer kol-global {
  :host {
    /*
     * The max-width is needed to prevent the table from overflowing the
     * parent node, if the table is wider than the parent node.
     */
    max-width: 100%;
    font-size: calc(16rem / var(--kolibri-root-font-size, 16));
  }
  * {
    /*
     * We prefer to box-sizing: border-box for all elements.
     */
    box-sizing: border-box;
  }
  /* KolSpan is a layout component with icons in all directions and a label text in the middle. */
  .kol-span-wc {
    display: grid;
    place-items: center;
  }
  /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */
  .kol-span-wc > span {
    display: flex;
    place-items: center;
  }
  a,
  button {
    cursor: pointer;
  }
  /* This is the text label. */
  .hide-label > .kol-span-wc > span > span {
    display: none;
  }
  /* Reset browser agent style. */
  button:disabled {
    color: unset;
  }
  .disabled label,
  .disabled:focus-within label,
  [aria-disabled=true],
  [aria-disabled=true]:focus,
  [disabled],
  [disabled]:focus {
    opacity: 0.5;
    outline: none;
    cursor: not-allowed;
  }
  [aria-disabled=true]:focus .kol-span-wc,
  [disabled]:focus .kol-span-wc {
    outline: none !important;
  }
  .badge-text-hint {
    color: black;
    background-color: lightgray;
  }
}
@layer kol-component {
  :host {
    display: block;
  }
}
@layer kol-component {
  .kol-tooltip-wc {
    display: contents;
  }
  .kol-tooltip-wc .tooltip-floating {
    opacity: 0;
    display: none;
    position: fixed;
    /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */
    top: 0;
    left: 0;
    /* Can be used to specify the tooltip-width from the outside. Unset by default. */
    width: var(--kol-tooltip-width, unset);
    max-width: 90vw;
    max-height: 90vh;
    animation-direction: normal;
    /* Can be used to specify the animation duration from the outside. 250ms by default. */
    animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);
    animation-fill-mode: forwards;
    animation-iteration-count: 1;
    animation-timing-function: ease-in;
  }
  .kol-tooltip-wc .tooltip-floating.hide {
    animation-name: hideTooltip;
  }
  .kol-tooltip-wc .tooltip-floating.show {
    animation-name: showTooltip;
  }
  /* Shared between content and arrow */
  .kol-tooltip-wc .tooltip-area {
    color: #000;
    background-color: #fff;
  }
  .kol-tooltip-wc .tooltip-arrow {
    transform: rotate(45deg);
    position: absolute;
    z-index: 999;
    width: calc(10rem / var(--kolibri-root-font-size, 16));
    height: calc(10rem / var(--kolibri-root-font-size, 16));
  }
  .kol-tooltip-wc .tooltip-content {
    position: relative;
    z-index: 1000;
  }
  @keyframes hideTooltip {
    0% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      display: none;
    }
  }
  @keyframes showTooltip {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }
}
@layer kol-component {
  .required label > span::after,
  .required legend > span::after {
    content: "*";
  }
}
@layer kol-component {
  input,
  textarea {
    cursor: text;
  }
  input[type=checkbox],
  input[type=color],
  input[type=file],
  input[type=radio],
  input[type=range],
  label,
  option,
  select {
    cursor: pointer;
  }
  /* input[type='checkbox'], */
  /* input[type='radio'], */
  /* input[type='range'], */
  input[type=color],
  input[type=date],
  input[type=datetime-local],
  input[type=email],
  input[type=file],
  input[type=month],
  input[type=number],
  input[type=password],
  input[type=search],
  input[type=tel],
  input[type=text],
  input[type=time],
  input[type=url],
  input[type=week],
  option,
  select,
  textarea {
    background-color: transparent;
    width: 100%;
  }
  /* needed hack for vertical alignment */
  input[type=file] {
    padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;
  }
  /* needed hack for vertical alignment */
  select[multiple] option {
    padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;
  }
}
@layer kol-component {
  .kol-alert-wc {
    display: grid;
  }
  .kol-alert-wc .heading {
    display: flex;
    place-items: center;
  }
  .kol-alert-wc .heading > div {
    flex-grow: 1;
  }
  .close {
    /* Visible with forced colors */
    outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));
  }
}
@layer kol-component {
  .kol-input {
    display: grid;
  }
  .kol-input .input-slot {
    flex-grow: 1;
  }
  input:focus,
  option:focus,
  select:focus,
  textarea:focus {
    outline: 0;
  }
  .input {
    background-color: white;
    display: flex;
    align-items: center;
    cursor: pointer;
  }
  button:not([role=link]) {
    min-height: auto;
  }
  .input > .kol-icon {
    display: grid;
    place-items: center;
  }
  .kol-input.required .input-tooltip .span-label::after {
    content: "*";
  }
}
@layer kol-component {
  .single-select {
    position: relative;
  }
  .single-select.disabled, .single-select.disabled * {
    cursor: not-allowed !important;
  }
  .single-select__group {
    display: inline-flex;
    align-items: center;
  }
  .single-select__input {
    flex-grow: 1;
  }
  .single-select__button {
    width: var(--a11y-min-size);
    height: auto;
  }
  .single-select__listbox {
    background-color: white;
    display: block;
    position: absolute;
    z-index: 2;
    max-height: calc((40rem / var(--kolibri-root-font-size, 16)) * var(--visible-options, 5) + (2rem / var(--kolibri-root-font-size, 16))) !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    list-style-type: none;
  }
  .single-select__item:not(.single-select__item--disabled).highlighted {
    background-color: #f0f0f0;
  }
  .single-select__listbox--cursor-hidden .single-select__item {
    cursor: none !important;
  }
  .single-select__item--disabled:focus, .single-select__item--disabled:focus * {
    cursor: not-allowed;
  }
  .single-select__no-results-message {
    display: flex;
    min-height: calc(50rem / var(--kolibri-root-font-size, 16));
    align-items: center;
    justify-content: center;
    cursor: default;
  }
}`,B=K,z=class{async getValue(){return this._value}async kolFocus(){return new Promise(e=>{requestAnimationFrame(()=>{var t;(t=this.refInput)===null||t===void 0||t.focus(),e()})})}onBlur(){var e,t,i;const n=(e=this.state._options)===null||e===void 0?void 0:e.find(s=>{var l,o;return((l=s.label)===null||l===void 0?void 0:l.toLowerCase())===((o=this._inputValue)===null||o===void 0?void 0:o.toLowerCase())});n?this.selectOption(n):(this._inputValue=(i=(t=this.state._options)===null||t===void 0?void 0:t.find(s=>s.value===this._value))===null||i===void 0?void 0:i.label,this._filteredOptions=[...this.state._options]),this._isOpen=!1,this._hasOpened=!1}createEventWithTarget(e,t){const i=new CustomEvent(e,{bubbles:!0,detail:t});return this.refInput&&(Object.defineProperty(i,"target",{value:this.refInput}),Object.defineProperty(i,"currentTarget",{value:this.refInput})),i}clearSelection(){if(!this.state._disabled){this._focusedOptionIndex=-1,this._value=null,this._inputValue="",this._filteredOptions=[...this.state._options];const t=this.createEventWithTarget("input",{name:this.state._name,value:null}),i=this.createEventWithTarget("change",{name:this.state._name,value:null});this.controller.onFacade.onInput(t,!0,{value:null}),this.controller.onFacade.onChange(i,{value:null})}}selectOption(e){var t,i;if(e.value===this._value){this._inputValue=e.label,this._filteredOptions=[...this.state._options];return}this._value=e.value,this._inputValue=e.label;const n=this.createEventWithTarget("input",{name:(t=this.state._name)!==null&&t!==void 0?t:"",value:e.value}),s=this.createEventWithTarget("change",{name:(i=this.state._name)!==null&&i!==void 0?i:"",value:e.value});this.controller.onFacade.onInput(n,!1,e.value),this.controller.onFacade.onChange(s,e.value),this._filteredOptions=[...this.state._options],this.controller.setFormAssociatedValue(this._value)}onInput(e){const t=e.target;this._inputValue=t.value,this._isOpen=!0,this.setFilteredOptionsByQuery(t.value),this._focusedOptionIndex=-1}handleKeyDownDropdown(e){e.key.length===1&&/[a-z0-9]/i.test(e.key)&&(e.preventDefault(),this._isOpen=!0,this.focusSuggestionStartingWith(e.key))}setFilteredOptionsByQuery(e){e?.trim()===""?this._filteredOptions=[...this.state._options]:Array.isArray(this.state._options)&&this.state._options.length>0&&e.length>0&&(this._filteredOptions=this.state._options.filter(t=>{var i,n;return(n=(i=t.label)===null||i===void 0?void 0:i.toLowerCase())===null||n===void 0?void 0:n.includes(e?.toLowerCase())}))}moveFocus(e){if(!this._filteredOptions)return;let t=this._focusedOptionIndex+e,i=0,n=!1;const s=this._filteredOptions.length;for(;i<s;){if(t>=this._filteredOptions.length&&(t=0),t<0&&(t=this._filteredOptions.length-1),!this._filteredOptions[t].disabled){n=!0;break}t+=e,i++}n&&(this._focusedOptionIndex=t,this.focusOption(this._focusedOptionIndex))}focusOption(e){if(this.refOptions){const t=this.refOptions[e];t?.focus()}}focusSuggestionStartingWith(e){const t=e.toLowerCase(),i=Array.isArray(this._filteredOptions)&&this._filteredOptions.findIndex(n=>n.label.toLowerCase().startsWith(t)&&!n.disabled);typeof i=="number"&&i>=0&&(this._focusedOptionIndex=i,this.focusOption(i))}render(){var e;const t=f(this.state._label),{ariaDescribedBy:i}=I(this.state);return a(b,{key:"1433f20a2defed480cdfb50a04a1dd13360f86b3",class:"kol-single-select"},a("div",{key:"18159815f75153c0959f7a65872f6c34d81083d2",class:`single-select ${this.state._disabled===!0?"disabled":""} `},a(_,{key:"0ecb14e3f2e3df4d90530a8599d08f4e16a6bbe0",_accessKey:this.state._accessKey,_alert:this.showAsAlert(),_disabled:this.state._disabled,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_msg:this.state._msg,_required:this.state._required,_shortKey:this.state._shortKey,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,role:"presentation"},a("span",{key:"434babd783c914627c145e8659f0efca36034207",slot:"label"},t?a("slot",{name:"expert"}):typeof this.state._accessKey=="string"||typeof this.state._shortKey=="string"?a(v,null,a(S,{badgeText:h(this.state._accessKey||this.state._shortKey),label:this.state._label})," ",a("kbd",{class:"badge-text-hint","aria-hidden":"true"},h(this.state._accessKey||this.state._shortKey))):a("span",null,this.state._label)),a("div",{key:"cded78e21aa33713865bf7e6a9f0c109258beb44",slot:"input"},a("div",{key:"323464b7c5c34f86561464efe7b8f2042020bd16",class:"single-select__group"},a("input",Object.assign({key:"d31aad3b8a7c79de4d2766a54f7a80b76208de85",ref:this.catchRef,class:"single-select__input","data-testid":"single-select-input",type:"text","aria-autocomplete":"both","aria-controls":"listbox",value:this._inputValue,accessKey:this.state._accessKey,"aria-keyshortcuts":this.state._shortKey,"aria-describedby":i.length>0?i.join(" "):void 0,"aria-label":this.state._hideLabel&&typeof this.state._label=="string"?this.state._label:void 0,"aria-activedescendant":this._isOpen&&this._focusedOptionIndex>=0?`option-${this._focusedOptionIndex}`:void 0,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",disabled:this.state._disabled,name:this.state._name,required:this.state._required},this.controller.onFacade,{onInput:this.onInput.bind(this),onChange:this.onChange.bind(this),onClick:this.toggleListbox.bind(this),onFocus:n=>{this.controller.onFacade.onFocus(n),this.inputHasFocus=!0},onBlur:n=>{this.controller.onFacade.onBlur(n),this.inputHasFocus=!1},placeholder:this.state._placeholder})),this._inputValue&&!this.state._hideClearButton&&a(c,{key:"ee1817f5169b0c40bd6324c633e147072df33a6e",_icons:"codicon codicon-close",_label:d("kol-delete-selection"),onClick:()=>{var n;this.clearSelection(),(n=this.refInput)===null||n===void 0||n.focus()},class:"single-select__delete"}),a("button",{key:"4747536e16e8e8eadd11b708fe3d1697fde076b1",tabindex:"-1",class:"single-select__button",onClick:this.toggleListbox.bind(this),disabled:this.state._disabled},a(c,{key:"39fcfc3b9d0b88ae1374711e72419f0af9f465f5",_icons:"codicon codicon-triangle-down",_label:d("kol-dropdown")}))),this._isOpen&&this.state._disabled!==!0&&a("ul",{key:"2292d17fe22bd94fc768f189a9a20d4ec70f26f2",role:"listbox",class:p("single-select__listbox",this.blockSuggestionMouseOver&&"single-select__listbox--cursor-hidden"),style:{"--visible-options":`${(e=this._rows)!==null&&e!==void 0?e:5}`},onKeyDown:this.handleKeyDownDropdown.bind(this)},Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0?this._filteredOptions.map((n,s)=>{var l;return a("li",{id:`option-${s}`,key:`-${s}`,ref:o=>{o&&(this.refOptions[s]=o)},tabIndex:-1,role:"option","aria-selected":this._value===n.value?"true":void 0,"aria-disabled":n.disabled?"true":void 0,onClick:o=>{var r;n.disabled||(this.selectOption(n),(r=this.refInput)===null||r===void 0||r.focus(),this.toggleListbox(o),this._isOpen=!1,this._hasOpened=!1)},onMouseOver:()=>{this.blockSuggestionMouseOver||(this._focusedOptionIndex=s,this.focusOption(s))},onFocus:()=>{n.disabled||(this._focusedOptionIndex=s,this.focusOption(s))},class:p("single-select__item",{"single-select__item--disabled":n.disabled}),onKeyDown:o=>{var r;n.disabled||(o.key==="Enter"||o.key==="NumpadEnter")&&(this.selectOption(n),(r=this.refInput)===null||r===void 0||r.focus(),this.toggleListbox(o),o.preventDefault())}},a("input",{class:"visually-hidden",type:"radio",disabled:(l=n.disabled)!==null&&l!==void 0?l:void 0,name:"options",id:`option-radio-${s}`,value:n.value,checked:this._value===n.value||s===this._focusedOptionIndex}),a("label",{htmlFor:`option-radio-${s}`,class:"radio-label"},n.label))}):a("li",{class:"single-select__no-results-message"},d("kol-no-results-message")," "))))))}handleFocusOut(){setTimeout(()=>{var e;!((e=this.host)===null||e===void 0)&&e.contains(document.activeElement)||this.onBlur()},0)}handleWindowBlur(){this.onBlur()}handleKeyDown(e){var t,i;const n=(s,l)=>{var o;e.preventDefault(),s!==void 0&&(this._isOpen=s,s||(o=this.refInput)===null||o===void 0||o.focus()),l?.()};switch(e.key){case"Down":case"ArrowDown":{this.blockSuggestionMouseOver=!0,n(!0,()=>this.moveFocus(1));break}case"Up":case"ArrowUp":{this.blockSuggestionMouseOver=!0,n(!0,()=>this.moveFocus(-1));break}case"Tab":this._isOpen&&(this._isOpen=!this._isOpen,(t=this.refInput)===null||t===void 0||t.focus());break;case"Esc":case"Escape":{this._hasOpened=!1,this._isOpen=!1,n(!1);break}case" ":{this._isOpen?Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0&&(this.selectOption(this._filteredOptions[this._focusedOptionIndex]),(i=this.refInput)===null||i===void 0||i.focus(),n(!1)):this.toggleListbox(e);break}case"NumpadEnter":case"Enter":{this.toggleListbox(e),this._hasOpened=!1,this._isOpen=!1;break}case"Home":{this.blockSuggestionMouseOver=!0,n(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=0,this.focusOption(this._focusedOptionIndex))});break}case"End":{this.blockSuggestionMouseOver=!0,n(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=this._filteredOptions?this._filteredOptions.length-1:0,this.focusOption(this._focusedOptionIndex))});break}case"PageUp":{this.blockSuggestionMouseOver=!0,n(void 0,()=>this._isOpen&&this.moveFocus(-10));break}case"PageDown":{this.blockSuggestionMouseOver=!0,n(void 0,()=>this._isOpen&&this.moveFocus(10));break}}}constructor(e){m(this,e),this.refOptions=[],this.catchRef=t=>{this.refInput=t},this.toggleListbox=t=>{var i;if(t?.preventDefault(),!this.state._disabled&&!this._hasOpened){this._isOpen=!0,this._hasOpened=!0,(i=this.refInput)===null||i===void 0||i.focus();const n=Array.isArray(this._filteredOptions)?this._filteredOptions.findIndex(l=>l.label===this._inputValue):-1,s=this.refOptions[n];s?.scrollIntoView({block:"nearest"}),this.focusOption(this._focusedOptionIndex)}},this._focusedOptionIndex=-1,this._isOpen=!1,this._hasOpened=!1,this._filteredOptions=[],this._inputValue="",this.blockSuggestionMouseOver=!1,this._accessKey=void 0,this._placeholder=void 0,this._alert=void 0,this._disabled=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._options=void 0,this._required=!1,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this._hideClearButton=!1,this._rows=void 0,this.state={_hideError:!1,_id:`id-${k()}`,_label:"",_options:[],_hideClearButton:!1},this.inputHasFocus=!1,this.controller=new E(this,"single-select",this.host)}showAsAlert(){return this.state._alert===void 0?!!this.state._touched&&!this.inputHasFocus:this.state._alert}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAlert(e){this.controller.validateAlert(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e),this._filteredOptions=e,this.updateInputValue(this._value)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),this.oldValue=e,this.updateInputValue(e)}validateHideClearButton(e){this.controller.validateHideClearButton(e)}validateRows(e){this.controller.validateRows(e)}handleMouseEvent(){this.blockSuggestionMouseOver=!1}updateInputValue(e){if(Array.isArray(this._options)){const t=this._options.find(i=>i.value===e);this._inputValue=t?String(t.label):""}}componentWillLoad(){this.refOptions=[],this._touched=this._touched===!0,this.controller.componentWillLoad(),this.oldValue=this._value,this._filteredOptions=this.state._options,this.updateInputValue(this._value)}onChange(e){var t,i,n,s;this.oldValue!==((t=this.refInput)===null||t===void 0?void 0:t.value)&&(this.oldValue=(i=this.refInput)===null||i===void 0?void 0:i.value),x("change",this.host,this._value),typeof((n=this.state._on)===null||n===void 0?void 0:n.onChange)=="function"&&!this._isOpen&&this.state._on.onChange(e,this._value&&this.oldValue!==((s=this.refInput)===null||s===void 0?void 0:s.value))}static get delegatesFocus(){return!0}get host(){return g(this)}static get watchers(){return{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"],"_hideClearButton ":["validateHideClearButton"],_rows:["validateRows"]}}};z.style={default:B};export{z as kol_single_select};
//# sourceMappingURL=kol-single-select.entry-D1Ea5FOB.js.map
