var _examples$TEXT_ONLY$e;

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; }

/*
Copyright (c) 2018 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { Card as BaseCard, StyledAction, StyledBody, StyledThumbnail, StyledTitle, hasThumbnail } from './index.js';
import { StyledLink as StyledActionLink } from '../link/index.js';
import { Button } from '../button/index.js';
import { mergeOverrides } from '../helpers/overrides.js';
import { thumbnail as thumbnailImg, header as headerImg } from './images.js';
import examples from './examples-list.js';
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 = mergeOverrides({
    Root: {
      style: {
        width: cardWidth
      }
    }
  }, overrides); //$FlowFixMe

  return React.createElement(BaseCard, _extends({}, otherProps, {
    overrides: cardOverrides
  }));
};

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