"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Suggestions = void 0;
const react_1 = __importDefault(require("react"));
const Suggestions = (props) => {
    if (!props.suggestions) {
        return null;
    }
    const options = props.suggestions.map(s => {
        if (typeof s === "string") {
            return react_1.default.createElement("option", { value: s, key: s });
        }
        return react_1.default.createElement("option", { value: s.value, key: s.value }, s.label);
    });
    return (react_1.default.createElement("datalist", { id: props.id }, options));
};
exports.Suggestions = Suggestions;
//# sourceMappingURL=Suggestions.js.map