"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var storybook_1 = require("../../test/storybook");
var _1 = require(".");
storybook_1.describe('CodeEditor', {
    title: 'Code editor.',
    width: '100%',
    height: '100%',
    padding: 30,
    hr: false,
    flex: true,
})
    .add('theme: DARK', function () { return storybook_1.React.createElement(Test, null); })
    .add('theme: LIGHT', function () { return storybook_1.React.createElement(Test, { theme: 'LIGHT' }); })
    .add('language: TypeScript', function () { return storybook_1.React.createElement(Test, { language: 'typescript' }); });
var Test = (function (_super) {
    tslib_1.__extends(Test, _super);
    function Test() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.state = { code: _this.props.code };
        _this.handleChange = function (e) {
            storybook_1.log.info('!! onChange', e);
            _this.setState({ code: e.code });
        };
        return _this;
    }
    Test.prototype.render = function () {
        return (storybook_1.React.createElement(_1.CodeEditor, tslib_1.__assign({}, this.props, { code: this.state.code, onChange: this.handleChange })));
    };
    return Test;
}(storybook_1.React.PureComponent));
//# sourceMappingURL=CodeEditor.stories.js.map