var __read = (this && this.__read) || function (o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
};
import React, { useState } from 'react';
import { Emoji } from '../commons/Emoji';
import { generateCodeWithFakes } from '@universal-login/commons';
import { getStyleForTopLevelComponent } from '../../core/utils/getStyleForTopLevelComponent';
import '../styles/emoji.sass';
import '../styles/emojiDefaults.sass';
export var EmojiPanelWithFakes = function (_a) {
    var publicKey = _a.publicKey, onEmojiClick = _a.onEmojiClick, className = _a.className;
    var _b = __read(useState(function () { return generateCodeWithFakes(publicKey); }), 1), securityCodeWithFakes = _b[0];
    var emojis = securityCodeWithFakes.map(function (code, index) { return (React.createElement("li", { className: "emoji-item", key: "securityCodeWithFakes_" + index },
        React.createElement("button", { id: "btn-" + code, onClick: function () { return onEmojiClick(code); }, className: "emoji-keyboard-button" },
            React.createElement(Emoji, { code: code })))); });
    return (React.createElement("div", { className: "universal-login-emojis" },
        React.createElement("div", { className: getStyleForTopLevelComponent(className) },
            React.createElement("ul", { className: "emojis-fakes-list" }, emojis))));
};
//# sourceMappingURL=EmojiPanelWithFakes.js.map