import * as tslib_1 from "tslib";
import * as React from 'react'; // tslint:disable-line:no-unused-variable
import * as PropTypes from 'prop-types';
import './Layer.Example.scss';
import '../../../common/_exampleStyles.scss';
import { BaseComponent } from '../../../Utilities';
import { Checkbox } from '../../../Checkbox';
import { Layer } from '../Layer';
import { AnimationClassNames } from '../../../Styling';
import * as exampleStylesImport from '../../../common/_exampleStyles.scss';
var exampleStyles = exampleStylesImport;
var LayerContentExample = /** @class */ (function (_super) {
    tslib_1.__extends(LayerContentExample, _super);
    function LayerContentExample(props) {
        var _this = _super.call(this, props) || this;
        _this.state = {
            time: new Date().toLocaleTimeString()
        };
        return _this;
    }
    LayerContentExample.prototype.componentDidMount = function () {
        var _this = this;
        this._async.setInterval(function () { return _this.setState({ time: new Date().toLocaleTimeString() }); }, 1000);
    };
    LayerContentExample.prototype.render = function () {
        return (React.createElement("div", { className: 'LayerExample-content ' + AnimationClassNames.scaleUpIn100 },
            React.createElement("div", { className: "LayerExample-textContent" }, this.context.message),
            React.createElement("div", null, this.state.time)));
    };
    LayerContentExample.contextTypes = {
        message: PropTypes.string
    };
    return LayerContentExample;
}(BaseComponent));
export { LayerContentExample };
var LayerBasicExample = /** @class */ (function (_super) {
    tslib_1.__extends(LayerBasicExample, _super);
    function LayerBasicExample(props) {
        var _this = _super.call(this, props) || this;
        _this.state = {
            showLayer: false
        };
        return _this;
    }
    LayerBasicExample.prototype.getChildContext = function () {
        return {
            message: 'Hello world.'
        };
    };
    LayerBasicExample.prototype.render = function () {
        var showLayer = this.state.showLayer;
        return (React.createElement("div", null,
            React.createElement(Checkbox, { className: exampleStyles.exampleCheckbox, label: "Wrap the content box belowed in a Layer", checked: showLayer, onChange: this._onChange }),
            showLayer ? (React.createElement(Layer, null,
                React.createElement(LayerContentExample, null))) : (React.createElement(LayerContentExample, null))));
    };
    LayerBasicExample.prototype._onChange = function (ev, checked) {
        this.setState({ showLayer: checked });
    };
    LayerBasicExample.childContextTypes = {
        message: PropTypes.string
    };
    return LayerBasicExample;
}(BaseComponent));
export { LayerBasicExample };
//# sourceMappingURL=Layer.Basic.Example.js.map