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

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

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