import React from '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.createElement(React.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.createElement("div", { "data-testid": "flippy-card-wrapper", className: "flippy-wrapper-container" }, /* @__PURE__ */ React.createElement("div", { "data-testid": "flippy-card", className: flipCardCSSClass }, /* @__PURE__ */ React.createElement("section", { "data-testid": "flippy-card-front", className: "card-face card-face--front" }, frontCard), /* @__PURE__ */ React.createElement("section", { "data-testid": "flippy-card-back", className: "card-face card-face--back" }, backCard)));
};

export { FlippyCard as F };
//# sourceMappingURL=FlippyCard-458dc9b1.js.map
