"use strict";
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;
};
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importStar(require("react"));
var Emoji_1 = require("../commons/Emoji");
var commons_1 = require("@universal-login/commons");
var getStyleForTopLevelComponent_1 = require("../../core/utils/getStyleForTopLevelComponent");
require("../styles/emoji.sass");
require("../styles/emojiDefaults.sass");
exports.EmojiPanelWithFakes = function (_a) {
    var publicKey = _a.publicKey, onEmojiClick = _a.onEmojiClick, className = _a.className;
    var _b = __read(react_1.useState(function () { return commons_1.generateCodeWithFakes(publicKey); }), 1), securityCodeWithFakes = _b[0];
    var emojis = securityCodeWithFakes.map(function (code, index) { return (react_1.default.createElement("li", { className: "emoji-item", key: "securityCodeWithFakes_" + index },
        react_1.default.createElement("button", { id: "btn-" + code, onClick: function () { return onEmojiClick(code); }, className: "emoji-keyboard-button" },
            react_1.default.createElement(Emoji_1.Emoji, { code: code })))); });
    return (react_1.default.createElement("div", { className: "universal-login-emojis" },
        react_1.default.createElement("div", { className: getStyleForTopLevelComponent_1.getStyleForTopLevelComponent(className) },
            react_1.default.createElement("ul", { className: "emojis-fakes-list" }, emojis))));
};
//# sourceMappingURL=EmojiPanelWithFakes.js.map