"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ModeCard = ModeCard;
exports.default = void 0;

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));

var _react = _interopRequireDefault(require("react"));

var _styles = require("@material-ui/core/styles");

var _Grid = _interopRequireDefault(require("@material-ui/core/Grid"));

var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));

var _getValue = _interopRequireDefault(require("get-value"));

var useStyles = function useStyles(props) {
  return (0, _styles.makeStyles)(function (theme) {
    return {
      root: {
        backgroundColor: (0, _getValue.default)(theme.palette, props.color),
        borderRadius: theme.shape.borderRadius,
        padding: theme.spacing(2),
        flexFlow: 'nowrap'
      }
    };
  });
};

function ModeCard(_ref) {
  var children = _ref.children,
      props = (0, _objectWithoutProperties2.default)(_ref, ["children"]);
  var classes = useStyles(props)();
  return /*#__PURE__*/_react.default.createElement(_Grid.default, {
    container: true,
    direction: "row",
    alignItems: "flex-start",
    spacing: 1,
    className: classes.root
  }, /*#__PURE__*/_react.default.createElement(_Grid.default, {
    item: true,
    style: {
      marginRight: '20px',
      width: '50px'
    }
  }, /*#__PURE__*/_react.default.createElement("p", {
    style: {
      fontSize: '48px',
      margin: '0'
    }
  }, props.iconText)), /*#__PURE__*/_react.default.createElement(_Grid.default, {
    item: true
  }, /*#__PURE__*/_react.default.createElement(_Grid.default, {
    item: true
  }, /*#__PURE__*/_react.default.createElement(_Typography.default, null, /*#__PURE__*/_react.default.createElement("strong", null, props.title))), /*#__PURE__*/_react.default.createElement(_Grid.default, {
    item: true,
    style: {
      margin: '10px 0'
    }
  }, /*#__PURE__*/_react.default.createElement(_Typography.default, null, props.subtitle)), /*#__PURE__*/_react.default.createElement(_Grid.default, {
    item: true
  }, props.buttonProp)));
}

var _default = ModeCard;
exports.default = _default;