"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function findOption(options, matching) {
    let index = options.findIndex(o => o.label.startsWith(matching));
    return index;
}
exports.findOption = findOption;
function findExactOption(options, matching) {
    const index = options.findIndex(o => o.label === matching);
    return index;
}
exports.findExactOption = findExactOption;
function findExactOptionId(options, matching) {
    const index = options.findIndex(o => o.id === matching);
    return index;
}
exports.findExactOptionId = findExactOptionId;
function filterOptions(options, matching) {
    return options.filter(o => matches(o.label, matching));
}
exports.filterOptions = filterOptions;
function matches(key, text) {
    return key.startsWith(text);
}
//# sourceMappingURL=DropdownOption.js.map