define(["require", "exports", "tslib", "react", "@fluentui/react", "./WeeklyDayPicker.Example.scss", "@fluentui/react/lib/Button"], function (require, exports, tslib_1, React, react_1, styles, Button_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.WeeklyDayPickerInlineExpandableExample = void 0;
    var WeeklyDayPickerInlineExpandableExample = /** @class */ (function (_super) {
        tslib_1.__extends(WeeklyDayPickerInlineExpandableExample, _super);
        function WeeklyDayPickerInlineExpandableExample(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(react_1.addDays(_this.state.selectedDate, -1));
                }
            };
            _this._goNext = function () {
                if (_this.state && _this.state.selectedDate) {
                    _this._onSelectDate(react_1.addDays(_this.state.selectedDate, 1));
                }
            };
            _this._expand = function () {
                _this.setState({
                    expanded: !_this.state.expanded,
                });
            };
            _this.state = {
                selectedDate: new Date(),
                expanded: false,
            };
            return _this;
        }
        WeeklyDayPickerInlineExpandableExample.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("div", null,
                    React.createElement(Button_1.DefaultButton, { className: styles.button, onClick: this._expand, text: "Expand/collapse", "aria-expanded": this.state.expanded })),
                React.createElement(react_1.WeeklyDayPicker, { weeksToShow: 6, onSelectDate: this._onSelectDate, firstDayOfWeek: react_1.DayOfWeek.Sunday, strings: react_1.defaultWeeklyDayPickerStrings, initialDate: this.state.selectedDate, showFullMonth: this.state.expanded }),
                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 WeeklyDayPickerInlineExpandableExample;
    }(React.Component));
    exports.WeeklyDayPickerInlineExpandableExample = WeeklyDayPickerInlineExpandableExample;
});
//# sourceMappingURL=WeeklyDayPicker.Inline.Expandable.Example.js.map