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 { node, oneOf } from "prop-types";
import Box from "../../../Box";
const PLAN_LINE_HEIGHT = 8;
const Plan = styled(Box)`
  max-width: 312px;
  width: 100%;
  position: relative;
  overflow: hidden;

  ${(props) => {
  const theme = props.theme.yoga;
  const { plan } = theme.components.card;
  return css`
      padding: ${plan.padding.top}px ${plan.padding.right}px
        ${plan.padding.bottom}px ${plan.padding.left}px;
      border: ${theme.borders.small}px solid ${theme.colors.light};
      border-radius: ${plan.radius}px;

      background-color: ${theme.colors.white};
    `;
}}
`;
const Border = styled.View`
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  height: 8px;
  background-color: ${({
  variant,
  theme: {
    yoga: {
      colors: { deepPurple, [variant]: color = deepPurple }
    }
  }
}) => color};
`;
const PlanCard = (_a) => {
  var _b = _a, {
    children = void 0,
    variant = "deepPurple"
  } = _b, rest = __objRest(_b, [
    "children",
    "variant"
  ]);
  return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Plan, __spreadProps(__spreadValues({}, rest), { children: [
    /* @__PURE__ */ jsx(Border, { variant }),
    children
  ] })) });
};
PlanCard.propTypes = {
  children: node,
  /** style the card border top color following the theme (primary, secondary,
   * vibin, hope, energy, relax, peace, verve, uplift, deepPurple, deep,
   * stamina, dark, medium, light, clear, white) */
  variant: oneOf([
    "primary",
    "secondary",
    "vibin",
    "hope",
    "energy",
    "relax",
    "peace",
    "verve",
    "uplift",
    "deepPurple",
    "stamina",
    "dark",
    "medium",
    "deep",
    "light",
    "clear",
    "white"
  ])
};
PlanCard.displayName = "PlanCard";
var PlanCard_default = PlanCard;
export {
  PLAN_LINE_HEIGHT,
  PlanCard_default as default
};
