'use strict';

var React = require('react');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

const FlippyCard = ({ children, flipState = "front" }) => {
  if ((children == null ? void 0 : children.length) > 3) {
    console.warn("More than two children passed into Flippy Card! \u{1F633}\u{1F633}\u{1F633} Picking first two...");
  }
  if (!children) return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null);
  const frontCard = children == null ? void 0 : children[0];
  const backCard = (children == null ? void 0 : children[1]) || (children == null ? void 0 : children[0]);
  const flipCardCSSClass = flipState === "front" ? "flippy-card" : "flippy-card is-flipped";
  return /* @__PURE__ */ React__default["default"].createElement("div", { "data-testid": "flippy-card-wrapper", className: "flippy-wrapper-container" }, /* @__PURE__ */ React__default["default"].createElement("div", { "data-testid": "flippy-card", className: flipCardCSSClass }, /* @__PURE__ */ React__default["default"].createElement("section", { "data-testid": "flippy-card-front", className: "card-face card-face--front" }, frontCard), /* @__PURE__ */ React__default["default"].createElement("section", { "data-testid": "flippy-card-back", className: "card-face card-face--back" }, backCard)));
};

exports.FlippyCard = FlippyCard;
//# sourceMappingURL=FlippyCard-bf0fd493.js.map
