define(["require", "exports", "tslib", "react", "@uifabric/date-time", "./WeeklyDayPicker.Example.scss", "office-ui-fabric-react/lib/Button"], function (require, exports, tslib_1, React, date_time_1, styles, Button_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var WeeklyDayPickerInlineExample = /** @class */ (function (_super) {
        tslib_1.__extends(WeeklyDayPickerInlineExample, _super);
        function WeeklyDayPickerInlineExample(props) {
            var _this = _super.call(this, props) || this;
            _this._onSelectDate = function (date) {
                _this.setState(function (prevState) {
                    return {
                        selectedDate: date,
                    };
                });
            };
            _this._goPrevious = function () {
                if (_this.state && _this.state.selectedDate) {
                    _this._onSelectDate(date_time_1.addDays(_this.state.selectedDate, -1));
                }
            };
            _this._goNext = function () {
                if (_this.state && _this.state.selectedDate) {
                    _this._onSelectDate(date_time_1.addDays(_this.state.selectedDate, 1));
                }
            };
            _this.state = {
                selectedDate: new Date(),
            };
            return _this;
        }
        WeeklyDayPickerInlineExample.prototype.render = function () {
            return (React.createElement("div", { className: styles.wrapper },
                React.createElement("div", null,
                    "Selected date(s):",
                    ' ',
                    React.createElement("span", null, !this.state.selectedDate ? 'Not set' : this.state.selectedDate.toLocaleString())),
                React.createElement(date_time_1.WeeklyDayPicker, { onSelectDate: this._onSelectDate, firstDayOfWeek: date_time_1.DayOfWeek.Wednesday, strings: date_time_1.defaultWeeklyDayPickerStrings, initialDate: this.state.selectedDate }),
                React.createElement("div", null,
                    React.createElement(Button_1.DefaultButton, { className: styles.button, onClick: this._goPrevious, text: "Previous" }),
                    React.createElement(Button_1.DefaultButton, { className: styles.button, onClick: this._goNext, text: "Next" }))));
        };
        return WeeklyDayPickerInlineExample;
    }(React.Component));
    exports.WeeklyDayPickerInlineExample = WeeklyDayPickerInlineExample;
});
//# sourceMappingURL=WeeklyDayPicker.Inline.Example.js.map