define(["require", "exports", "tslib", "react", "office-ui-fabric-react/lib/DetailsList", "office-ui-fabric-react/lib/Link", "office-ui-fabric-react/lib/Utilities", "./DetailsListExample.scss"], function (require, exports, tslib_1, React, DetailsList_1, Link_1, Utilities_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var DetailsListNavigatingFocusExample = /** @class */ (function (_super) {
        tslib_1.__extends(DetailsListNavigatingFocusExample, _super);
        function DetailsListNavigatingFocusExample() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.state = {
                items: generateItems(''),
                initialFocusedIndex: undefined,
            };
            _this._columns = [
                {
                    key: 'filepath',
                    name: 'File path',
                    onRender: function (item) {
                        return (React.createElement(Link_1.Link, { key: item, onClick: _this._navigate(item) }, item));
                    },
                },
                {
                    key: 'size',
                    name: 'Size',
                    onRender: function (item) { return '4 KB'; },
                }
            ];
            return _this;
        }
        DetailsListNavigatingFocusExample.prototype.render = function () {
            return (React.createElement(DetailsList_1.DetailsList, { items: this.state.items, columns: this._columns, initialFocusedIndex: this.state.initialFocusedIndex }));
        };
        DetailsListNavigatingFocusExample.prototype._navigate = function (name) {
            var _this = this;
            return function () {
                _this.setState({
                    items: generateItems(name + '/'),
                    initialFocusedIndex: 0,
                });
            };
        };
        tslib_1.__decorate([
            Utilities_1.autobind
        ], DetailsListNavigatingFocusExample.prototype, "_navigate", null);
        return DetailsListNavigatingFocusExample;
    }(React.Component));
    exports.DetailsListNavigatingFocusExample = DetailsListNavigatingFocusExample;
    function generateItems(parent) {
        return Array.prototype.map.call('abcdefghi', function (name) { return parent + name; });
    }
});
//# sourceMappingURL=DetailsList.NavigatingFocus.Example.js.map