"use strict";

import { useContext } from 'react';
import { View } from 'react-native';
import { ApplicationContext } from "../Context/index.js";
import { Colors } from "../Consts/index.js";
import { Text } from "../Text/index.js";
import styles from "./styles.js";
import { jsx as _jsx } from "react/jsx-runtime";
const Badge = ({
  label = 'Label',
  type,
  style
}) => {
  const {
    theme
  } = useContext(ApplicationContext);
  const renderDot = () => {
    return /*#__PURE__*/_jsx(View, {
      style: [styles.dotContainer, {
        backgroundColor: theme.colors.error.default,
        borderColor: theme.colors.border.disable
      }]
    });
  };
  const renderDefault = () => {
    return /*#__PURE__*/_jsx(View, {
      style: [styles.defaultContainer, {
        backgroundColor: theme.colors.error.default,
        borderColor: theme.colors.border.disable
      }, style],
      children: /*#__PURE__*/_jsx(Text, {
        typography: 'caption2',
        fontWeight: 'bold',
        color: Colors.white,
        children: label
      })
    });
  };
  switch (type) {
    case 'dot':
      return renderDot();
    default:
      return renderDefault();
  }
};
export { Badge };
//# sourceMappingURL=index.js.map