import * as classNames from "classnames";
import { observer } from "mobx-react";
import * as React from "react";
import { Icon, Table } from "semantic-ui-react";
import { Section } from "@common/sprinklersRpc";
/* tslint:disable:object-literal-sort-keys */
@observer
export default class SectionTable extends React.Component<{
sections: Section[];
}> {
private static renderRow(section: Section, index: number) {
if (!section) {
return null;
}
const { name, state } = section;
const sectionStateClass = classNames({
"section-state": true,
running: state
});
const sectionState = state ? (