import PropTypes from 'prop-types';
import React from 'react';
import ReactDOM from 'react-dom';
import { ConfigProvider } from '@alifd/next';
const { config } = ConfigProvider;
class Output extends React.Component {
    render() {
        const { prefix, locale } = this.props;
        return (React.createElement("ul", null,
            React.createElement("li", null,
                "prefix: ",
                prefix),
            React.createElement("li", null,
                "locale: ",
                JSON.stringify(locale))));
    }
}
Output.propTypes = {
    prefix: PropTypes.string,
    locale: PropTypes.object,
};
Output.defaultProps = {
    prefix: 'next-',
    locale: {
        hello: '你好',
    },
};
const Func = () => {
    return React.createElement("div", null, "This is a Function Component");
};
const NewFunc = config(Func);
const NewOutput = config(Output);
class Demo extends React.Component {
    render() {
        return (React.createElement(ConfigProvider, { prefix: "custom-", locale: { Output: { hello: 'hello' } } },
            React.createElement("div", null,
                React.createElement(NewOutput, null),
                React.createElement(NewFunc, null))));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('config-provider-demo-2'));
