'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var styled = require('styled-components');
var index = require('../../utils/index.js');

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

var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);

const FlexDiv = styled__default['default'].div `
  display: flex;
  align-items: center;
  justify-content: center;
`;
const IconWrapper = styled__default['default'](FlexDiv).withConfig({
    shouldForwardProp: index.convertToTransientProps(['isSubtle']),
}) `
  svg {
    height: ${index.getSpacing('s04')};
    width: ${index.getSpacing('s04')};
    margin-right: ${index.getSpacing('s01')};
    fill: ${index.getColorAlias('contentLight')};
  }
`;
const Tag = styled__default['default'](FlexDiv).withConfig({
    shouldForwardProp: index.convertToTransientProps(['isSubtle']),
}) `
  border-radius: ${({ size, theme }) => size === 'large' ? theme.radius.roundedB : theme.radius.roundedA};
  width: fit-content;
  height: fit-content;
  padding: ${({ size, theme }) => size === 'large'
    ? ` 2px ${theme.spacing.s01}`
    : ` ${theme.spacing.s00} ${theme.spacing.s01}`};
  color: ${index.getColorAlias('contentLight')};
  text-align: center;
  font-family: ${(props) => props.theme.font.familyPrimary};
  font-weight: ${(props) => props.theme.font.weightRegular};
  letter-spacing: ${index.getSpacing('s00')};
  ${({ size }) => size === 'small'
    ? styled.css `
          ${index.getFontSize('size12')};
        `
    : styled.css `
          ${index.getFontSize('size14')};
        `}
`;
const TagSubtle = styled__default['default'](Tag) `
  color: ${index.getColorAlias('contentDefault')};
  svg {
    fill: ${index.getColorAlias('contentDefault')};
  }
`;
const TagNeutral = styled__default['default'](Tag)((props) => props.isSubtle
    ? styled.css `
        background-color: ${index.getColorAlias('containerStrong')};
        color: ${index.getColorAlias('contentDefault')};
        svg {
          fill: ${index.getColorAlias('contentDefault')};
        }
      `
    : styled.css `
        background-color: ${index.getColorAlias('containerInverse')};
        color: ${index.getColorAlias('contentInverse')};
        svg {
          fill: ${index.getColorAlias('contentInverse')};
        }
      `);
const TagPositive = styled__default['default'](Tag) `
  background-color: ${({ isSubtle }) => isSubtle
    ? styled.css `
          ${index.getColorAlias('supportPositive02')}
        `
    : styled.css `
          ${index.getColorAlias('supportPositive')}
        `};
  ${({ theme, isSubtle }) => isSubtle &&
    theme.mode === 'light' &&
    styled.css `
      color: ${index.getColorAlias('supportPositive')};
      svg {
        fill: ${index.getColorAlias('supportPositive')};
      }
    `};
`;
const TagError = styled__default['default'](Tag) `
  background-color: ${({ isSubtle }) => isSubtle
    ? styled.css `
          ${index.getColorAlias('supportError02')}
        `
    : styled.css `
          ${index.getColorAlias('supportError')}
        `};
  ${({ theme, isSubtle }) => isSubtle &&
    theme.mode === 'light' &&
    styled.css `
      color: ${index.getColorAlias('supportError')};
      svg {
        fill: ${index.getColorAlias('supportError')};
      }
    `};
`;
const TagInfo = styled__default['default'](TagSubtle) `
  background-color: ${index.getColorAlias('supportInfo02')};
`;
const TagWarning = styled__default['default'](TagSubtle) `
  background-color: ${index.getColorAlias('supportWarning02')};
`;
const TagBrand = styled__default['default'](TagSubtle) `
  background-color: ${index.getColorAlias('supportBrand02')};
`;
const TagGhost = styled__default['default'](TagSubtle) `
  background: none;
`;
const TagNeutralAlternative = styled__default['default'](TagSubtle) `
  background-color: ${index.getColorAlias('containerDefault')};
`;
const TagOutline = styled__default['default'](TagSubtle) `
  background: none;
  border: 1px solid ${index.getColorAlias('borderStrong')};
`;

exports.FlexDiv = FlexDiv;
exports.IconWrapper = IconWrapper;
exports.Tag = Tag;
exports.TagBrand = TagBrand;
exports.TagError = TagError;
exports.TagGhost = TagGhost;
exports.TagInfo = TagInfo;
exports.TagNeutral = TagNeutral;
exports.TagNeutralAlternative = TagNeutralAlternative;
exports.TagOutline = TagOutline;
exports.TagPositive = TagPositive;
exports.TagSubtle = TagSubtle;
exports.TagWarning = TagWarning;
