import * as React from 'react';
import { FilteredConnection } from '../../components/FilteredConnection';
import { PageTitle } from '../../components/PageTitle';
import { eventLogger } from '../../tracking/eventLogger';
import { GitRefNode, queryGitRefs } from '../GitRef';
/** A page that shows all of a repository's branches. */
export class RepositoryBranchesAllPage extends React.PureComponent {
    constructor() {
        super(...arguments);
        this.queryBranches = (args) => queryGitRefs(Object.assign({}, args, { repo: this.props.repo.id, type: "GIT_BRANCH" /* GIT_BRANCH */ }));
    }
    componentDidMount() {
        eventLogger.logViewEvent('RepositoryBranchesAll');
    }
    render() {
        return (React.createElement("div", { className: "repository-branches-page" },
            React.createElement(PageTitle, { title: "All branches" }),
            React.createElement(FilteredConnection, { className: "", listClassName: "list-group list-group-flush", noun: "branch", pluralNoun: "branches", queryConnection: this.queryBranches, nodeComponent: GitRefNode, defaultFirst: 20, autoFocus: true, history: this.props.history, location: this.props.location })));
    }
}
//# sourceMappingURL=RepositoryBranchesAllPage.js.map