"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var clsx_1 = __importDefault(require("clsx"));
var styles_1 = require("@mui/styles");
var Radio_1 = __importDefault(require("@mui/material/Radio"));
var colors_1 = require("../../base/colors");
var useStyles = styles_1.makeStyles({
    root: {
        "&:hover": {
            backgroundColor: "transparent",
        },
    },
    icon: {
        borderRadius: "50%",
        width: 16,
        height: 16,
        boxShadow: "inset 0 0 0 1px " + colors_1.grey.standard + ", inset 0 -1px 0 " + colors_1.grey.standard,
        "$root.Mui-focusVisible &": {
            outline: "2px auto rgba(19,124,189,.6)",
            outlineOffset: 2,
        },
        "input:hover ~ &": {
            boxShadow: "inset 0 0 0 1px " + colors_1.green.light + ", inset 0 -1px 0 " + colors_1.green.light,
            border: "2px " + colors_1.green.light,
        },
        "input:disabled ~ &": {
            boxShadow: "inset 0 0 0 1px " + colors_1.grey.light + ", inset 0 -1px 0 " + colors_1.grey.light,
            background: colors_1.grey.soft,
        },
    },
    checkedIcon: {
        backgroundColor: colors_1.green.dark,
        boxShadow: "none",
        "&:before": {
            display: "block",
            width: 16,
            height: 16,
            backgroundImage: "radial-gradient(#fff,#fff 28%,transparent 32%)",
            content: '""',
        },
        "input:hover ~ &": {
            backgroundColor: colors_1.green.dark,
            boxShadow: "none",
        },
    },
});
function StyledRadio(props) {
    var classes = useStyles();
    return (react_1.default.createElement(Radio_1.default, __assign({ className: classes.root, disableRipple: true, color: "default", checkedIcon: react_1.default.createElement("span", { className: clsx_1.default(classes.icon, classes.checkedIcon) }), icon: react_1.default.createElement("span", { className: classes.icon }) }, props)));
}
exports.default = StyledRadio;
//# sourceMappingURL=Radio.js.map