"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.StyledNestedBadge = exports.StyledImg = exports.StyledFlag = exports.StyledFallback = void 0;
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _ = require("../../../..");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var NESTEDBADGE_HEIGHT = {
  m: 28,
  l: 32,
  xl: 40
};
var NESTEDBADGE_WIDTH = {
  m: 26,
  l: 28,
  xl: 36
};
var StyledNestedBadge = exports.StyledNestedBadge = _styledComponents.default.div.withConfig({
  displayName: "NestedBadgestyles__StyledNestedBadge",
  componentId: "sc-168bhj8-0"
})(["position:relative;height:", "px;width:", "px;"], function (p) {
  return NESTEDBADGE_HEIGHT[p.$badgeSize];
}, function (p) {
  return NESTEDBADGE_WIDTH[p.$badgeSize];
});
var IMAGE_SIZE = {
  m: 24,
  l: 24,
  xl: 32
};
var IMAGE_MARGIN = {
  m: 2,
  l: 4,
  xl: 4
};
var MASK_POSITION = {
  m: 6,
  l: 4,
  xl: 4
};
var MASK_SIZE_PERCENT = {
  m: [34, 36],
  l: [31, 32],
  xl: [22, 23]
};
var StyledImg = exports.StyledImg = _styledComponents.default.img.withConfig({
  displayName: "NestedBadgestyles__StyledImg",
  componentId: "sc-168bhj8-1"
})(["border-radius:50%;height:", "px;width:", "px;margin:", "px 0;outline:1px solid ", ";outline-offset:-1px;", ";"], function (p) {
  return IMAGE_SIZE[p.$badgeSize];
}, function (p) {
  return IMAGE_SIZE[p.$badgeSize];
}, function (p) {
  return IMAGE_MARGIN[p.$badgeSize];
}, function (p) {
  return p.theme.colorTokens.neutral.border_brand;
}, function (p) {
  return p.$showFlag ? "\n  mask-image: radial-gradient(\n    circle at calc(100% - ".concat(MASK_POSITION[p.$badgeSize], "px) calc(100% - ").concat(MASK_POSITION[p.$badgeSize], "px),\n    transparent ").concat(MASK_SIZE_PERCENT[p.$badgeSize][0], "%,\n    black ").concat(MASK_SIZE_PERCENT[p.$badgeSize][1], "%\n  )") : '';
});
var StyledFallback = exports.StyledFallback = _styledComponents.default.div.withConfig({
  displayName: "NestedBadgestyles__StyledFallback",
  componentId: "sc-168bhj8-2"
})(["display:flex;align-items:center;justify-content:center;background:", ";border-radius:50%;height:", "px;width:", "px;position:absolute;margin:", "px 0;", ";span{line-height:unset;}"], function (p) {
  return p.theme.colorTokens.neutral.background_disabled;
}, function (p) {
  return IMAGE_SIZE[p.$badgeSize];
}, function (p) {
  return IMAGE_SIZE[p.$badgeSize];
}, function (p) {
  return IMAGE_MARGIN[p.$badgeSize];
}, function (p) {
  return p.$showFlag ? "\n  mask-image: radial-gradient(\n    circle at calc(100% - ".concat(MASK_POSITION[p.$badgeSize], "px) calc(100% - ").concat(MASK_POSITION[p.$badgeSize], "px),\n    transparent ").concat(MASK_SIZE_PERCENT[p.$badgeSize][0], "%,\n    black ").concat(MASK_SIZE_PERCENT[p.$badgeSize][1], "%\n  )") : '';
});
var FLAG_LEFT = {
  m: 10,
  l: 12,
  xl: 20
};
var FLAG_TOP = {
  m: 12,
  l: 16,
  xl: 24
};
var StyledFlag = exports.StyledFlag = (0, _styledComponents.default)(_.Flag).withConfig({
  displayName: "NestedBadgestyles__StyledFlag",
  componentId: "sc-168bhj8-3"
})(["position:absolute;left:", "px;top:", "px;height:16px;width:16px;border-radius:49%;mask-image:radial-gradient(circle at 8px,white 56%,transparent 60%);"], function (p) {
  return FLAG_LEFT[p.$badgeSize];
}, function (p) {
  return FLAG_TOP[p.$badgeSize];
});