import {
	observer,
} from 'mobx-react';

@observer
export default class Congratulations extends React.Component {
	render() {
		const {
			store
		} = this.props, {
			is_congratulation_show,
			is_congratulation_selected,
			body_congratulation_style,
			congratulation_datas,
			handleCardItemClick,
		} = store, {
			paragraph
		} = congratulation_datas;

		if (!is_congratulation_show) return null;

		return (
			<div 
				id="congratulation"
				className={`editor-body-congratulation${is_congratulation_selected ? " selected" : ""}`} 
				style={body_congratulation_style} 
				onClick={e => handleCardItemClick(e, "congratulation")}
				dangerouslySetInnerHTML = {{ __html: paragraph  }}
			/>
		)

	}
}