import { jsx } from '@emotion/core';
import { Badge } from '../Badge/Badge.esm.js';
import '../icons/BlogIcon.esm.js';
import '../icons/CheckIcon.esm.js';
import '../icons/PortfolioIcon.esm.js';
import '../icons/EcommerceIcon.esm.js';
import '../icons/CheckCircleIcon.esm.js';
import '../icons/EllipsisIcon.esm.js';
import '../icons/InProgressIcon.esm.js';
import '../icons/CloseCircleIcon.esm.js';
import '../icons/SuccessIcon.esm.js';
import '../icons/GeneralIcon.esm.js';
import '../icons/ReportsIcon.esm.js';
import '../icons/SkullIcon.esm.js';
import '../icons/BuildsIcon.esm.js';
import '../icons/IntegrationsIcon.esm.js';
import FreePlanIcon from '../icons/FreePlanIcon.esm.js';
import ProfessionalPlanIcon from '../icons/ProfessionalPlanIcon.esm.js';
import BusinessPlanIcon from '../icons/BusinessPlanIcon.esm.js';
import EnterprisePlanIcon from '../icons/EnterprisePlanIcon.esm.js';
import '../icons/BitbucketIcon.esm.js';
import '../icons/GitHubIcon.esm.js';
import '../icons/GitLabIcon.esm.js';

/** @jsx jsx */

var baseCss = function baseCss(_theme) {
  return {
    fontWeight: 500
  };
};

var planTypeFreeCss = function planTypeFreeCss(theme) {
  return {
    borderColor: theme.colors.orange[10],
    backgroundColor: theme.colors.orange[10],
    color: theme.colors.red[70]
  };
};

var planTypeProfessionalCss = function planTypeProfessionalCss(theme) {
  return {
    borderColor: theme.colors.blue[10],
    backgroundColor: theme.colors.blue[10],
    color: theme.colors.blue[90]
  };
};

var planTypeBusinessCss = function planTypeBusinessCss(theme) {
  return {
    borderColor: theme.colors.purple[10],
    backgroundColor: theme.colors.purple[10],
    color: theme.colors.purple[70]
  };
};

var planTypeEnterpriseCss = function planTypeEnterpriseCss(theme) {
  return {
    borderColor: theme.colors.purple[80],
    backgroundColor: theme.colors.purple[80],
    color: theme.colors.white
  };
};

var planTypeTrialingCss = function planTypeTrialingCss(theme) {
  return {
    borderColor: theme.colors.green[10],
    backgroundColor: theme.colors.green[10],
    color: theme.colors.green[90]
  };
};

var planTypeCss = {
  FREE: planTypeFreeCss,
  PROFESSIONAL: planTypeProfessionalCss,
  BUSINESS: planTypeBusinessCss,
  ENTERPRISE: planTypeEnterpriseCss,
  TRIALING: planTypeTrialingCss
};
var planTypeLabels = {
  FREE: "Free",
  PROFESSIONAL: "Professional",
  BUSINESS: "Business",
  ENTERPRISE: "Enterprise",
  TRIALING: "Professional Trial"
};
var planTypeIcons = {
  FREE: FreePlanIcon,
  PROFESSIONAL: ProfessionalPlanIcon,
  BUSINESS: BusinessPlanIcon,
  ENTERPRISE: EnterprisePlanIcon,
  TRIALING: undefined
};
function PlanIndicator(_ref) {
  var planType = _ref.planType;
  var label = planTypeLabels[planType];
  var Icon = planTypeIcons[planType];
  return jsx(Badge, {
    size: "M",
    textVariant: "DEFAULT",
    Icon: Icon,
    "aria-label": "Plan: ".concat(label),
    css: function css(theme) {
      return [baseCss(), planTypeCss[planType](theme)];
    }
  }, label);
}
PlanIndicator.__docgenInfo = {
  "description": "",
  "methods": [],
  "displayName": "PlanIndicator",
  "props": {
    "planType": {
      "required": true,
      "tsType": {
        "name": "union",
        "raw": "`FREE`\n| `PROFESSIONAL`\n| `BUSINESS`\n| `ENTERPRISE`\n| `TRIALING`",
        "elements": [{
          "name": "literal",
          "value": "undefined"
        }, {
          "name": "literal",
          "value": "undefined"
        }, {
          "name": "literal",
          "value": "undefined"
        }, {
          "name": "literal",
          "value": "undefined"
        }, {
          "name": "literal",
          "value": "undefined"
        }]
      },
      "description": ""
    }
  }
};

if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
  STORYBOOK_REACT_CLASSES["src/components/PlanIndicator/PlanIndicator.tsx"] = {
    name: "PlanIndicator",
    docgenInfo: PlanIndicator.__docgenInfo,
    path: "src/components/PlanIndicator/PlanIndicator.tsx"
  };
}

export { PlanIndicator };
//# sourceMappingURL=PlanIndicator.esm.js.map
