"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
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) {
    __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, __assign({}, this.props, { code: this.state.code, onChange: this.handleChange })));
    };
    return Test;
}(storybook_1.React.PureComponent));
//# sourceMappingURL=CodeEditor.stories.js.map