"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 __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Select = void 0;
var material_1 = require("@mui/material");
var styles_1 = require("@mui/styles");
var Select_1 = __importDefault(require("@mui/material/Select"));
var react_1 = __importDefault(require("react"));
var colors_1 = require("../../base/colors");
var useStyles = styles_1.makeStyles(function (theme) {
    return styles_1.createStyles({
        hover: {
            "&:hover": {
                backgroundColor: colors_1.blue.subtle,
            },
        },
        paper: {
            border: "1px solid " + colors_1.green.light,
        },
        selectRoot: {
            "&:hover": {
                borderColor: colors_1.green.light,
                "&& fieldset": {
                    border: "3px solid green",
                },
            },
            paddingTop: 12,
            paddingBottom: 12,
        },
        select: {
            "&:before": {
                borderColor: colors_1.grey.standard,
            },
            "&:after": {
                borderColor: colors_1.grey.standard,
            },
            "&:not(.Mui-disabled):hover:before": {
                borderColor: colors_1.green.light,
            },
            paddingBottom: theme.spacing(1),
            paddingTop: theme.spacing(1),
        },
    });
});
var Select = function (_a) {
    var onChange = _a.onChange, children = _a.children, value = _a.value, width = _a.width, props = __rest(_a, ["onChange", "children", "value", "width"]);
    var styles = useStyles();
    return (react_1.default.createElement(Select_1.default, __assign({ style: { width: width }, variant: "outlined", value: value, onChange: onChange, classes: {
            select: styles.select,
        }, MenuProps: {
            classes: {
                paper: styles.paper,
            },
        } }, props, { input: react_1.default.createElement(material_1.OutlinedInput, { style: { border: "solid 1px " + colors_1.grey.standard } }) }), children));
};
exports.Select = Select;
exports.default = exports.Select;
//# sourceMappingURL=Select.js.map