define(["require", "exports", "tslib", "react", "@uifabric/date-time", "./Calendar.Example.scss"], function (require, exports, tslib_1, React, date_time_1, styles) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var CalendarInlineCustomDayCellRefExample = /** @class */ (function (_super) {
        tslib_1.__extends(CalendarInlineCustomDayCellRefExample, _super);
        function CalendarInlineCustomDayCellRefExample(props) {
            var _this = _super.call(this, props) || this;
            _this._onSelectDate = function (date) {
                _this.setState(function (prevState) {
                    return {
                        selectedDate: date,
                    };
                });
            };
            _this.state = {
                selectedDate: new Date(),
            };
            return _this;
        }
        CalendarInlineCustomDayCellRefExample.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.Calendar, { dateRangeType: date_time_1.DateRangeType.Day, highlightCurrentMonth: false, highlightSelectedMonth: true, showGoToToday: true, calendarDayProps: {
                        customDayCellRef: function (element, date, classNames) {
                            if (element) {
                                element.title = 'custom title from customDayCellRef: ' + date.toString();
                                if (date.getDay() === 0 || date.getDay() === 6) {
                                    classNames.dayOutsideBounds && element.classList.add(classNames.dayOutsideBounds);
                                    element.children[0].disabled = true;
                                }
                            }
                        },
                    }, onSelectDate: this._onSelectDate, value: this.state.selectedDate, firstDayOfWeek: date_time_1.DayOfWeek.Sunday, strings: date_time_1.defaultDayPickerStrings })));
        };
        return CalendarInlineCustomDayCellRefExample;
    }(React.Component));
    exports.CalendarInlineCustomDayCellRefExample = CalendarInlineCustomDayCellRefExample;
});
//# sourceMappingURL=Calendar.Inline.CustomDayCellRef.Example.js.map