"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = require("react"); // tslint:disable-line:no-unused-variable
var PropTypes = require("prop-types");
require("./Layer.Example.scss");
var Utilities_1 = require("office-ui-fabric-react/lib/Utilities");
var Checkbox_1 = require("office-ui-fabric-react/lib/Checkbox");
var Layer_1 = require("office-ui-fabric-react/lib/Layer");
var Styling_1 = require("../../../Styling");
var LayerContentExample = (function (_super) {
    tslib_1.__extends(LayerContentExample, _super);
    function LayerContentExample() {
        var _this = _super.call(this) || 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 ' + Styling_1.AnimationClassNames.scaleUpIn100 },
            React.createElement("div", { className: 'LayerExample-textContent' }, this.context.message),
            React.createElement("div", null, this.state.time)));
    };
    return LayerContentExample;
}(Utilities_1.BaseComponent));
LayerContentExample.contextTypes = {
    message: PropTypes.string
};
exports.LayerContentExample = LayerContentExample;
var LayerBasicExample = (function (_super) {
    tslib_1.__extends(LayerBasicExample, _super);
    function LayerBasicExample() {
        var _this = _super.call(this) || this;
        _this.state = {
            showLayer: false
        };
        return _this;
    }
    LayerBasicExample.prototype.getChildContext = function () {
        return {
            'message': 'Hello world.'
        };
    };
    LayerBasicExample.prototype.render = function () {
        var _this = this;
        var showLayer = this.state.showLayer;
        return (React.createElement("div", null,
            React.createElement(Checkbox_1.Checkbox, { label: 'Wrap the content box belowed in a Layer', checked: showLayer, onChange: function (ev, checked) { return _this.setState({ showLayer: checked }); } }),
            showLayer ? (React.createElement(Layer_1.Layer, null,
                React.createElement(LayerContentExample, null))) : (React.createElement(LayerContentExample, null))));
    };
    return LayerBasicExample;
}(Utilities_1.BaseComponent));
LayerBasicExample.childContextTypes = {
    message: PropTypes.string
};
exports.LayerBasicExample = LayerBasicExample;

//# sourceMappingURL=Layer.Basic.Example.js.map
