import Button from '../../button';
import ConfigProvider from '../../config-provider';
import Dialog from '..';
import React from 'react';
import ReactDOM from 'react-dom';
const NormalDialog = () => {
    return (React.createElement("div", null,
        React.createElement(Button, { onClick: () => {
                Dialog.confirm({
                    title: 'Dialog.confirm 命令式弹窗',
                });
            } }, "\u4F7F\u7528 Dialog.confirm")));
};
// @ts-ignore
const DialogWitchContext = Dialog.withContext(({ contextDialog }) => {
    return (React.createElement("div", null,
        React.createElement(Button, { onClick: () => {
                contextDialog.confirm({
                    title: 'Dialog.withContext 命令式弹窗',
                });
            } }, "\u4F7F\u7528 Dialog.withContext")));
});
class Demo extends React.Component {
    render() {
        return (React.createElement(ConfigProvider, { locale: {
                Dialog: {
                    close: '关闭（根组件文案）',
                    ok: '确认（根组件文案）',
                    cancel: '取消（根组件文案）',
                },
            } },
            React.createElement(ConfigProvider, { locale: {
                    Dialog: {
                        close: '关闭（局部文案）',
                        ok: '确认（局部文案）',
                        cancel: '取消（局部文案）',
                    },
                } },
                React.createElement("div", null,
                    React.createElement(NormalDialog, null),
                    React.createElement("br", null),
                    React.createElement(DialogWitchContext, null)))));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('dialog-demo-8'));
