import * as tslib_1 from "tslib";
import * as React from 'react';
import { css } from '../../Utilities';
import { Check } from '../../Check';
import * as DetailsRowCheckStyles from './DetailsRowCheck.scss';
import * as CheckStylesModule from '../Check/Check.scss';
// tslint:disable:no-any
var CheckStyles = CheckStylesModule;
export var DetailsRowCheck = function (props) {
    var _a = props.canSelect, canSelect = _a === void 0 ? false : _a, _b = props.isSelected, isSelected = _b === void 0 ? false : _b, _c = props.anySelected, anySelected = _c === void 0 ? false : _c, _d = props.selected, selected = _d === void 0 ? false : _d, _e = props.isHeader, isHeader = _e === void 0 ? false : _e, className = props.className, buttonProps = tslib_1.__rest(props, ["canSelect", "isSelected", "anySelected", "selected", "isHeader", "className"]);
    var isPressed = props.isSelected || props.selected;
    return (React.createElement("div", tslib_1.__assign({}, buttonProps, { role: "checkbox", className: css(className, 'ms-DetailsRow-check', DetailsRowCheckStyles.check, CheckStyles.checkHost, (_f = {},
            _f["ms-DetailsRow-check--isDisabled " + DetailsRowCheckStyles.isDisabled] = !props.canSelect,
            _f["ms-DetailsRow-check--isHeader " + DetailsRowCheckStyles.isHeader] = props.isHeader,
            _f)), "aria-checked": isPressed, "data-selection-toggle": true, "data-automationid": "DetailsRowCheck" }),
        React.createElement(Check, { checked: isPressed })));
    var _f;
};
//# sourceMappingURL=DetailsRowCheck.js.map