import { __extends } from "tslib";
import * as React from 'react';
import { Calendar, DateRangeType, DayOfWeek, defaultDayPickerStrings } from '@uifabric/date-time';
import * as styles from './Calendar.Example.scss';
var CalendarInlineNonContiguousWorkWeekDaysExample = /** @class */ (function (_super) {
    __extends(CalendarInlineNonContiguousWorkWeekDaysExample, _super);
    function CalendarInlineNonContiguousWorkWeekDaysExample(props) {
        var _this = _super.call(this, props) || this;
        _this._onSelectDate = function (date, dateRangeArray) {
            _this.setState(function (prevState) {
                return {
                    selectedDate: date,
                    selectedDateRange: dateRangeArray,
                };
            });
        };
        _this.state = {
            selectedDate: new Date(),
            selectedDateRange: undefined,
        };
        return _this;
    }
    CalendarInlineNonContiguousWorkWeekDaysExample.prototype.render = function () {
        var dateRangeString = null;
        if (this.state.selectedDateRange) {
            var rangeStart = this.state.selectedDateRange[0];
            var rangeEnd = this.state.selectedDateRange[this.state.selectedDateRange.length - 1];
            dateRangeString = rangeStart.toLocaleDateString() + '-' + rangeEnd.toLocaleDateString();
        }
        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,
                "Selected dates:",
                React.createElement("span", null,
                    " ",
                    !dateRangeString ? 'Not set' : dateRangeString)),
            React.createElement(Calendar, { dateRangeType: DateRangeType.WorkWeek, highlightCurrentMonth: false, highlightSelectedMonth: true, showGoToToday: true, workWeekDays: [DayOfWeek.Tuesday, DayOfWeek.Saturday, DayOfWeek.Wednesday, DayOfWeek.Friday], onSelectDate: this._onSelectDate, value: this.state.selectedDate, firstDayOfWeek: DayOfWeek.Monday, strings: defaultDayPickerStrings })));
    };
    return CalendarInlineNonContiguousWorkWeekDaysExample;
}(React.Component));
export { CalendarInlineNonContiguousWorkWeekDaysExample };
//# sourceMappingURL=Calendar.Inline.NonContiguousWorkWeekDays.Example.js.map