import { defineComponent, h, PropType } from 'vue' import { CElementCover } from '../element-cover' import { CVirtualScroller } from '../virtual-scroller' import { getNextSibling, getPreviousSibling } from '../../utils' import type { Option, OptionsGroup } from './types' import { getOptionLabel, highlightSubstring, isOptionDisabled, isOptionSelected } from './utils' const CAutocompleteOptions = defineComponent({ name: 'CAutocompleteOptions', props: { highlightOptionsOnSearch: Boolean, loading: Boolean, options: { type: Array as PropType<(Option | OptionsGroup)[]>, required: true, }, optionsMaxHeight: [Number, String] as PropType, scopedSlots: Object, searchNoResultsLabel: [Boolean, String] as PropType, searchValue: String, selected: [Object, String, null] as PropType