var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
  for (var prop in b || (b = {}))
    if (__hasOwnProp.call(b, prop))
      __defNormalProp(a, prop, b[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b)) {
      if (__propIsEnum.call(b, prop))
        __defNormalProp(a, prop, b[prop]);
    }
  return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
import { jsx, jsxs } from "react/jsx-runtime";
import React from "react";
import styled, { css } from "styled-components";
import { string, node } from "prop-types";
import Content from "../Card/Content";
import Text from "../../../Text";
import theme from "../../../Theme/helpers/themeReader";
import Subtitle from "./Subtitle";
import Divider from "../../../Divider";
const Title = styled(Text.Medium)`
  ${(props) => {
  const {
    components: { cardnative, card }
  } = theme(props);
  return css`
      color: ${card.plan.title.color};
      margin-bottom: ${cardnative.plan.title.margin.bottom}px;
      line-height: ${cardnative.plan.title.lineHeight}px;
    `;
}}
`;
const Description = styled(Text.Small)`
  height: 40px;

  color: ${theme.components.card.plan.description.color};
`;
const Price = styled.View`
  flex-direction: row;

  ${(props) => {
  const {
    components: {
      cardnative: { plan }
    }
  } = theme(props);
  return css`
      margin-bottom: ${plan.price.margin.bottom}px;
    `;
}}
`;
const EnhancePrice = styled.View`
  align-self: center;
`;
const PlanCardContent = (_a) => {
  var _b = _a, {
    title,
    price,
    period,
    subtitle = null,
    description = null,
    currency = null,
    suffix = null,
    children = null
  } = _b, rest = __objRest(_b, [
    "title",
    "price",
    "period",
    "subtitle",
    "description",
    "currency",
    "suffix",
    "children"
  ]);
  return /* @__PURE__ */ jsxs(Content, __spreadProps(__spreadValues({}, rest), { children: [
    subtitle && /* @__PURE__ */ jsx(Subtitle, { children: subtitle }),
    title && /* @__PURE__ */ jsx(Title, { children: title }),
    description && /* @__PURE__ */ jsx(Description, { numberOfLines: 2, children: description }),
    /* @__PURE__ */ jsxs(Price, { children: [
      currency && /* @__PURE__ */ jsx(Text.H4, { children: currency }),
      price && /* @__PURE__ */ jsx(Text.H4, { children: price }),
      suffix && /* @__PURE__ */ jsx(Text.H4, { children: suffix }),
      period && /* @__PURE__ */ jsx(EnhancePrice, { children: /* @__PURE__ */ jsx(Text.Medium, { children: `${period}` }) })
    ] }),
    /* @__PURE__ */ jsx(Divider, {}),
    children
  ] }));
};
PlanCardContent.propTypes = {
  /** plan name */
  title: string.isRequired,
  /** currency of the current country */
  currency: string,
  /** suffix currency of the current country */
  suffix: string,
  price: string.isRequired,
  /** period that this price will be charged  */
  period: string.isRequired,
  description: string,
  subtitle: string,
  children: node
};
PlanCardContent.displayName = "PlanCard.Content";
var Content_default = PlanCardContent;
export {
  Content_default as default
};
