"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const styles_1 = require("@mui/material/styles");
const material_1 = require("@mui/material");
const emoji_picker_react_1 = require("emoji-picker-react");
const system_1 = require("@mui/system");
const classnames_1 = tslib_1.__importDefault(require("classnames"));
const utils_1 = require("@selfcommunity/utils");
let Picker;
(0, utils_1.isClientSideRendering)() &&
    Promise.resolve().then(() => tslib_1.__importStar(require('emoji-picker-react'))).then((_module) => {
        Picker = _module.default;
    });
const PREFIX = 'SCEmojiPicker';
const classes = {
    root: `${PREFIX}-root`
};
const Root = (0, styles_1.styled)(material_1.Box, {
    name: PREFIX,
    slot: 'Root',
    overridesResolver: (props, styles) => styles.root
})(() => ({}));
function EmojiPicker(inProps) {
    // PROPS
    const props = (0, system_1.useThemeProps)({
        props: inProps,
        name: PREFIX
    });
    const { className = '', emojiStyle = emoji_picker_react_1.EmojiStyle.NATIVE } = props, rest = tslib_1.__rest(props, ["className", "emojiStyle"]);
    return (0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: Picker && (0, jsx_runtime_1.jsx)(Picker, Object.assign({ emojiStyle: emojiStyle }, rest)) }));
}
exports.default = EmojiPicker;
