"use strict";

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

var React = _interopRequireWildcard(require("react"));

var _classnames = _interopRequireDefault(require("classnames"));

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

var _Box = _interopRequireDefault(require("../Box"));

var _Card = require("./Card.styled");

var _Content = _interopRequireDefault(require("./components/Content"));

var _Actions = _interopRequireDefault(require("./components/Actions"));

var _Header = _interopRequireDefault(require("./components/Header"));

var _Card2 = require("./Card.type");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

var name = 'Card';
exports.name = name;
var useStyles = (0, _styles.createUseStyles)(_Card.styles, {
  name: name
});
var Card = React.forwardRef(function (props, ref) {
  var _classNames;

  var _props$as = props.as,
      Component = _props$as === void 0 ? 'div' : _props$as,
      classNameProp = props.className,
      _props$pure = props.pure,
      pure = _props$pure === void 0 ? false : _props$pure,
      _props$dynamic = props.dynamic,
      dynamic = _props$dynamic === void 0 ? false : _props$dynamic,
      _props$minWidth = props.minWidth,
      minWidth = _props$minWidth === void 0 ? 275 : _props$minWidth,
      _props$maxWidth = props.maxWidth,
      maxWidth = _props$maxWidth === void 0 ? 355 : _props$maxWidth,
      rest = _objectWithoutProperties(props, ["as", "className", "pure", "dynamic", "minWidth", "maxWidth"]);

  var classes = useStyles(props);
  var className = (0, _classnames["default"])(classes.root, (_classNames = {}, _defineProperty(_classNames, classes.pure, pure), _defineProperty(_classNames, classes.dynamic, dynamic), _classNames), classNameProp);
  return React.createElement(_Box["default"], _extends({
    as: Component,
    className: className,
    ref: ref,
    minWidth: minWidth,
    maxWidth: maxWidth
  }, rest));
});
Object.defineProperty(Card, 'Content', {
  get: function get() {
    return _Content["default"];
  }
});
Object.defineProperty(Card, 'Actions', {
  get: function get() {
    return _Actions["default"];
  }
});
Object.defineProperty(Card, 'Header', {
  get: function get() {
    return _Header["default"];
  }
});
Card.displayName = "F".concat(name);
Card.propTypes = _Card2.CardPropTypes;
var _default = Card;
exports["default"] = _default;