"use strict";

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

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

var _README = _interopRequireDefault(require("./README.mdx"));

var _Card = _interopRequireDefault(require("./Card.twig"));

var _Button = _interopRequireDefault(require("../Button"));

var _ = require(".");

var _iconsReact = require("@wfp/icons-react");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: 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); }

var _default = {
  title: 'Components/Content Related/Card',
  component: _.Card,
  subcomponents: {
    CardExternal: _.CardExternal
  },
  parameters: {
    componentSubtitle: 'Component',
    status: 'released',
    mdx: _README.default,
    twig: _Card.default
  }
};
exports.default = _default;

var SimpleCard = function SimpleCard(args) {
  return /*#__PURE__*/_react.default.createElement(_.Card, args);
};

exports.SimpleCard = SimpleCard;
SimpleCard.args = {
  subTitle: 'Food security and climate change analyses, adaptation planning, and good practices in food security adaptation programming.',
  title: 'The Climate Adaption Mangement and Innovation Initiative',
  kind: 'simple-card',
  metadata: 'Publication',
  url: 'https://www.wfp.org',
  isExternal: true
};

var SimpleCardWithImage = function SimpleCardWithImage(args) {
  return /*#__PURE__*/_react.default.createElement(_.Card, args);
};

exports.SimpleCardWithImage = SimpleCardWithImage;
SimpleCardWithImage.args = {
  subTitle: 'Food security and climate change analyses, adaptation planning, and good practices in food security adaptation programming.',
  title: 'The Climate Adaption Mangement and Innovation Initiative',
  kind: 'simple-card',
  metadata: 'Publication',
  image: 'http://www1.wfp.org/sites/default/files/images/yemen-hero-min.jpg'
};

var Overlay = function Overlay(args) {
  return /*#__PURE__*/_react.default.createElement(_.Card, args);
};

exports.Overlay = Overlay;
Overlay.args = {
  image: 'http://www1.wfp.org/sites/default/files/images/yemen-hero-min.jpg',
  kind: 'overlay',
  subTitle: 'Food security and climate change analyses, adaptation planning, and good practices in food security adaptation programming.',
  title: 'The Climate Adaption Mangement and Innovation Initiative',
  metadata: 'Publication',
  cardWidth: '350px',
  cardHeight: '400px'
};

var External = function External(args) {
  return /*#__PURE__*/_react.default.createElement(_.CardExternal, _extends({
    truncated: true
  }, args), /*#__PURE__*/_react.default.createElement("div", {
    className: "wfp--card-ext__actions"
  }, /*#__PURE__*/_react.default.createElement(_Button.default, {
    className: "wfp--card-ext__action",
    kind: "ghost",
    small: true,
    style: {
      textTransform: 'uppercase'
    }
  }, "Action 1"), /*#__PURE__*/_react.default.createElement(_Button.default, {
    className: "wfp--card-ext__action",
    kind: "ghost",
    small: true
  }, "Action 2"), /*#__PURE__*/_react.default.createElement(_Button.default, {
    className: "wfp--card-ext__action wfp--card-ext__action--align-to-right",
    kind: "ghost",
    small: true,
    icon: _iconsReact.StarSolidGlyph,
    iconDescription: "FavoriteOutline16"
  })));
};

exports.External = External;
External.args = {
  label: 'Label',
  heading: 'Heading',
  subHeading: 'subheading',
  caption: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae congue magna. Mauris vitae velit lacinia, porttitor tellus sit amet, hendrerit ipsum. Vivamus sagittis leo ut erat eleifend, sed',
  tag: 'tag',
  labelStatus: true,
  image: "http://www1.wfp.org/sites/default/files/images/yemen-hero-min.jpg"
};
External.story = {
  parameters: {
    docs: {
      storyDescription: 'Add a description'
    }
  }
};