var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
import React from "react";
import styled from "styled-components";
import { color, position, shadow, border, background, layout } from "styled-system";
const ActiveCircle = styled.div `
  position: absolute;
  top: 0;
  right: 0;
  height: 10px;
  width: 10px;
  border-radius: 9999px;
  box-sizing: content-box;
  background-color: ${p => p.theme.colors.error.c50};

  border: 2px solid
    var(
      --notification-badge-border,
      ${p => {
    /* The CSS variable is dynamically set by the Notification component */
    return p.theme.colors.background.main;
}}
    );
`;
const Wrapper = styled.div `
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  ${color}
  ${position}
  ${shadow}
  ${border}
  ${background}
  ${layout}
`;
export default function Badge(_a) {
    var { active, icon } = _a, props = __rest(_a, ["active", "icon"]);
    return (React.createElement(Wrapper, Object.assign({}, props),
        icon,
        active && React.createElement(ActiveCircle, null)));
}
//# sourceMappingURL=Badge.js.map