"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var DetailsList_1 = require("office-ui-fabric-react/lib/DetailsList");
var Link_1 = require("office-ui-fabric-react/lib/Link");
require("./DetailsListExample.scss");
var DetailsListNavigatingFocusExample = (function (_super) {
    __extends(DetailsListNavigatingFocusExample, _super);
    function DetailsListNavigatingFocusExample() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.state = {
            items: generateItems(''),
            initialFocusedIndex: undefined,
        };
        _this._columns = [
            {
                name: 'File path',
                onRender: function (item) {
                    return React.createElement(Link_1.Link, { key: item, onClick: function () { return _this.navigate(item); } }, item);
                },
            },
            {
                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) {
        this.setState({
            items: generateItems(name + '/'),
            initialFocusedIndex: 0,
        });
    };
    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
