import {
	observable,
	action,
} from 'mobx';

export default class DialogStore {
	get staticDialogProps() {
		return {
			hasScroll: true,
			icon: 'icon-coms-hrm',
			iconBgcolor: '#217346',
			onCancel: () => this.closeDialog && this.closeDialog(),
		}
	};

	@observable buttons = [];

	@observable visible = false;

	@action openDialog = () => {
		this.visible = true;
	}

	@action closeDialog = () => {
		this.visible = false;
	}

	setDialogConfig = (config) =>{
		Object.keys(config).forEach(key=>{
			this[key] = config[key];
		})
		return this;
	}
}