"use strict";

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

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

var _ = require("./");

var _link = require("../link");

var _button = require("../button");

var _overrides = require("../helpers/overrides");

var _images = require("./images");

var _examplesList = _interopRequireDefault(require("./examples-list"));

var _examples$TEXT_ONLY$e;

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

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 _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 _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 cardWidth = '328px';
var placeholderTitle = 'Card Title Entry';
var placeholderText = 'Proin ut dui sed metus pharetra hend rerit vel non mi. Nulla ornare faucibus ex, non facilisis nisl. Maecenas aliquet mauris ut tempus cursus. Etiam semper luctus sem ac blandit. ';

var Card = function Card(props) {
  var overrides = props.overrides,
      otherProps = _objectWithoutProperties(props, ["overrides"]);

  var cardOverrides = (0, _overrides.mergeOverrides)({
    Root: {
      style: {
        width: cardWidth
      }
    }
  }, overrides); //$FlowFixMe

  return _react.default.createElement(_.Card, _extends({}, otherProps, {
    overrides: cardOverrides
  }));
};

Card.defaultProps = {
  hasThumbnail: _.hasThumbnail,
  overrides: {}
};

var _default = (_examples$TEXT_ONLY$e = {}, _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.TEXT_ONLY, function Story1() {
  return _react.default.createElement(Card, null, _react.default.createElement(_.StyledBody, null, placeholderText));
}), _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.TEXT_IMAGE, function Story2() {
  return _react.default.createElement(Card, {
    headerImage: _images.header,
    title: placeholderTitle
  }, placeholderText);
}), _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.TEXT_IMAGE_LINK, function Story3() {
  return _react.default.createElement(Card, {
    headerImage: _images.header,
    title: placeholderTitle
  }, _react.default.createElement(_.StyledBody, null, placeholderText), _react.default.createElement(_.StyledAction, null, _react.default.createElement(_link.StyledLink, {
    href: "#"
  }, "Link to a Place")));
}), _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.TEXT_IMAGE_BUTTON, function Story4() {
  return _react.default.createElement(Card, {
    headerImage: _images.header,
    title: placeholderTitle
  }, _react.default.createElement(_.StyledBody, null, placeholderText), _react.default.createElement(_.StyledAction, null, _react.default.createElement(_button.Button, {
    style: {
      width: '100%'
    }
  }, "Button Label")));
}), _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.TEXT_LINK, function Story5() {
  return _react.default.createElement(Card, null, _react.default.createElement(_.StyledTitle, null, placeholderTitle), _react.default.createElement(_.StyledBody, null, placeholderText), _react.default.createElement(_.StyledAction, null, _react.default.createElement(_link.StyledLink, {
    href: "#"
  }, "Link to a Place")));
}), _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.TEXT_BUTTON, function Story6() {
  return _react.default.createElement(Card, null, _react.default.createElement(_.StyledTitle, null, placeholderTitle), _react.default.createElement(_.StyledBody, null, placeholderText), _react.default.createElement(_.StyledAction, null, _react.default.createElement(_button.Button, {
    style: {
      width: '100%'
    }
  }, "Button Label")));
}), _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.HEADLINE_TEXT_THUMBNAIL, function Story7() {
  return _react.default.createElement(Card, {
    thumbnail: _images.thumbnail,
    title: placeholderTitle
  }, _react.default.createElement(_.StyledBody, null, placeholderText), _react.default.createElement(_.StyledAction, null, _react.default.createElement(_button.Button, {
    style: {
      width: '100%'
    }
  }, "Button Label")));
}), _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.HEADLINE_IMAGE, function Story8() {
  return _react.default.createElement(Card, {
    headerImage: _images.header,
    title: placeholderTitle
  });
}), _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.HEADLINE_TEXT, function Story9() {
  return _react.default.createElement(Card, null, _react.default.createElement(_.StyledTitle, null, placeholderTitle), _react.default.createElement(_.StyledBody, null, placeholderText));
}), _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.THUMBNAIL_LINK, function Story10() {
  return _react.default.createElement(Card, {
    thumbnail: _images.thumbnail,
    title: placeholderTitle
  }, _react.default.createElement(_.StyledBody, null, placeholderText), _react.default.createElement(_.StyledAction, null, _react.default.createElement(_link.StyledLink, {
    href: "#"
  }, "Link to a Place")));
}), _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.THUMBNAIL_BUTTON, function Story11() {
  return _react.default.createElement(Card, {
    thumbnail: _images.thumbnail,
    title: placeholderTitle
  }, _react.default.createElement(_.StyledBody, null, placeholderText), _react.default.createElement(_.StyledAction, null, _react.default.createElement(_button.Button, {
    style: {
      width: '100%'
    }
  }, "Button Label")));
}), _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.KITCHEN_SINK_PROPS, function Story12() {
  return _react.default.createElement(Card, {
    action: _react.default.createElement(_button.Button, {
      style: {
        width: '100%'
      }
    }, "Button Label"),
    headerImage: _images.header,
    title: placeholderTitle,
    thumbnail: _images.thumbnail
  }, placeholderText);
}), _defineProperty(_examples$TEXT_ONLY$e, _examplesList.default.KITCHEN_SINK_COMPOSED, function Story13() {
  return _react.default.createElement(Card, {
    headerImage: _images.header
  }, _react.default.createElement(_.StyledThumbnail, {
    src: _images.thumbnail
  }), _react.default.createElement(_.StyledTitle, {
    $hasThumbnail: true
  }, placeholderTitle), _react.default.createElement(_.StyledBody, null, placeholderText), _react.default.createElement(_.StyledAction, null, _react.default.createElement(_button.Button, {
    style: {
      width: '100%'
    }
  }, "Button Label")));
}), _examples$TEXT_ONLY$e);

exports.default = _default;