import {
	observer
} from 'mobx-react';
import {
	WeaDialog,
} from 'ecCom';
import {
	Loading,
} from '../../public/learn';
import DialogContent from './DialogContent';

@observer
export default class Dialog extends React.Component {
	constructor(props) {
		super(props);
	}

	render() {
		const {
			store
		} = this.props, {
			DIALOG,
			dialog,
			dialogStyle,
			dialogButtons,
			moreBtn,
			icon,
			iconBgcolor,
			dialogLoading,
		} = store;

		return (
			<WeaDialog
				{...DIALOG}
				{...dialog}
				style={dialogStyle}
				buttons={dialogButtons}
				moreBtn={moreBtn}
				icon={icon}
				iconBgcolor={iconBgcolor}
				loading={dialogLoading}
			>
				<DialogContent store={store}/>
			</WeaDialog>
		);
	}
}