import {
	observer
} from 'mobx-react';
import {
	WeaDialog
} from "ecCom";

@observer
export default class Dialog extends React.Component {
	render() {
		const {
			store
		} = this.props, {
			dialogProps,
			title,
			style,
			visible,
			buttons,
			moreBtn={},
			closeDialog,
			scalable,
			moduleName,
		} = store;

		return (
			<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@ekm31b`}
			  {...dialogProps}
	          title={title}
	          style={style}
	          visible={visible}
	          scalable={scalable}
	          buttons={buttons}
	          moreBtn={moreBtn}
	          onCancel={closeDialog}
	          moduleName={moduleName}
        	>
        	    {this.props.children}
        	</WeaDialog>
		)
	}
}