import { __rest } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import { styled } from '@mui/material/styles';
import { Box } from '@mui/material';
import { EmojiStyle } from 'emoji-picker-react';
import { useThemeProps } from '@mui/system';
import classNames from 'classnames';
import { isClientSideRendering } from '@selfcommunity/utils';
let Picker;
isClientSideRendering() &&
    import('emoji-picker-react').then((_module) => {
        Picker = _module.default;
    });
const PREFIX = 'SCEmojiPicker';
const classes = {
    root: `${PREFIX}-root`
};
const Root = styled(Box, {
    name: PREFIX,
    slot: 'Root',
    overridesResolver: (props, styles) => styles.root
})(() => ({}));
export default function EmojiPicker(inProps) {
    // PROPS
    const props = useThemeProps({
        props: inProps,
        name: PREFIX
    });
    const { className = '', emojiStyle = EmojiStyle.NATIVE } = props, rest = __rest(props, ["className", "emojiStyle"]);
    return _jsx(Root, Object.assign({ className: classNames(classes.root, className) }, { children: Picker && _jsx(Picker, Object.assign({ emojiStyle: emojiStyle }, rest)) }));
}
