{
  "version": 3,
  "sources": ["ssg:https://asset.29cm.co.kr/contents/framer/components/ruler/Badge/Badge.constants.js", "ssg:https://asset.29cm.co.kr/contents/framer/components/ruler/Badge/Badge.utils.js", "ssg:https://asset.29cm.co.kr/contents/framer/components/ruler/Badge/Badge.js"],
  "sourcesContent": ["import \"react/jsx-runtime\";\nimport { plus } from \"../../@shared/Icon/assets/plus.js\";\nimport { heart } from \"../../@shared/Icon/assets/heart.js\";\nimport { bell } from \"../../@shared/Icon/assets/bell.js\";\nimport { gift } from \"../../@shared/Icon/assets/gift.js\";\nimport { share } from \"../../@shared/Icon/assets/share.js\";\nimport { scrap } from \"../../@shared/Icon/assets/scrap.js\";\nimport { lock } from \"../../@shared/Icon/assets/lock.js\";\nimport { lockOff } from \"../../@shared/Icon/assets/lockOff.js\";\nconst UNSET_COLOR = {\n  backgroundColor: \"#000000\",\n  color: \"#FFFFFF\"\n};\nconst prefixIconAssets = {\n  plus,\n  scrap,\n  lock,\n  lockOff,\n  heart,\n  bell,\n  gift,\n  share\n};\nconst BADGE_PREFIX_ICON_OPTIONS = Object.keys(prefixIconAssets);\nexport {\n  BADGE_PREFIX_ICON_OPTIONS,\n  UNSET_COLOR\n};\n", "const getBadgeBackgroundColor = (backgroundColor, isBlur) => {\n  if (typeof backgroundColor === \"string\") {\n    return backgroundColor;\n  }\n  if (isBlur) {\n    return backgroundColor.hasBlur;\n  }\n  return backgroundColor.default;\n};\nconst getBadgeTextColor = (color, isBlur) => {\n  if (typeof color === \"string\") {\n    return color;\n  }\n  if (isBlur) {\n    return color.hasBlur;\n  }\n  return color.default;\n};\nexport {\n  getBadgeBackgroundColor,\n  getBadgeTextColor\n};\n", "import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport { Icon } from \"../../@shared/Icon/Icon.js\";\nimport { typography } from \"../../../styles/typography.js\";\nimport { UNSET_COLOR } from \"./Badge.constants.js\";\nimport { getBadgeBackgroundColor, getBadgeTextColor } from \"./Badge.utils.js\";\nconst Badge = forwardRef(({\n  variant = \"system\",\n  priority = \"primary\",\n  tone = \"default\",\n  size = \"small\",\n  isWhite = false,\n  isBlur = false,\n  prefixIcon,\n  label = \"Label\",\n  customBackgroundColor = \"#000000\",\n  customTextColor = \"#FFFFFF\",\n  style,\n  ...rest\n}, ref) => {\n  var _a;\n  const theme = isWhite ? \"light\" : \"dark\";\n  const customizedBadgeColor = {\n    backgroundColor: customBackgroundColor,\n    color: customTextColor\n  };\n  const configuredBadgeColors = ((_a = badgeStyleByVariant[priority][tone]) == null ? void 0 : _a[theme]) ?? UNSET_COLOR;\n  const {\n    backgroundColor,\n    color\n  } = variant === \"custom\" ? customizedBadgeColor : configuredBadgeColors;\n  const badgeBackgroundColor = getBadgeBackgroundColor(backgroundColor, isBlur);\n  const badgeTextColor = getBadgeTextColor(color, isBlur);\n  const badgePadding = prefixIcon ? badgeStyleBySize[size].padding.withPrefixIcon : badgeStyleBySize[size].padding.default;\n  const badgeStyle = {\n    ...baseBadgeStyle,\n    ...badgeStyleBySize[size],\n    padding: badgePadding,\n    backgroundColor: badgeBackgroundColor,\n    color: badgeTextColor\n  };\n  return /* @__PURE__ */ jsxs(\"div\", { style: {\n    ...badgeStyle,\n    ...style\n  }, ref, ...rest, children: [\n    prefixIcon ? /* @__PURE__ */ jsx(Icon, { type: prefixIcon, fill: true, size: iconSizeByBadgeSize[size], color: badgeTextColor, weight: \"bold\" }) : null,\n    /* @__PURE__ */ jsx(\"span\", { children: label })\n  ] });\n});\nconst baseBadgeStyle = {\n  display: \"flex\",\n  gap: \"2px\",\n  justifyContent: \"center\",\n  alignItems: \"center\",\n  borderRadius: \"2px\",\n  whiteSpace: \"nowrap\"\n};\nconst badgeStyleBySize = {\n  medium: {\n    ...typography(12, 500, \"16.32px\"),\n    padding: {\n      default: \"4px 8px\",\n      withPrefixIcon: \"4px 8px 4px 6px\"\n    }\n  },\n  small: {\n    ...typography(10, 500, \"12px\"),\n    padding: {\n      default: \"2px 6px\",\n      withPrefixIcon: \"2px 6px 2px 4px\"\n    }\n  }\n};\nconst badgeStyleByVariant = {\n  primary: {\n    default: {\n      light: {\n        backgroundColor: \"#FFFFFF\",\n        color: \"#000000\"\n      },\n      dark: {\n        backgroundColor: \"#000000\",\n        color: \"#FFFFFF\"\n      }\n    },\n    information: {\n      dark: {\n        backgroundColor: \"#375FFF\",\n        color: \"#FFFFFF\"\n      }\n    },\n    positive: {\n      dark: {\n        backgroundColor: \"#12BA23\",\n        color: \"#FFFFFF\"\n      }\n    },\n    negative: {\n      dark: {\n        backgroundColor: \"#D53F00\",\n        color: \"#FFFFFF\"\n      }\n    }\n  },\n  secondary: {\n    default: {\n      dark: {\n        backgroundColor: {\n          default: \"#F4F4F4\",\n          hasBlur: \"#5D5D5D80\"\n        },\n        color: {\n          default: \"#474747\",\n          hasBlur: \"#FFFFFF\"\n        }\n      }\n    },\n    information: {\n      dark: {\n        backgroundColor: \"#345FFF14\",\n        color: \"#375FFF\"\n      }\n    },\n    positive: {\n      dark: {\n        backgroundColor: \"#16BA2214\",\n        color: \"#12BA23\"\n      }\n    },\n    negative: {\n      dark: {\n        backgroundColor: \"#FF480014\",\n        color: \"#D53F00\"\n      }\n    }\n  },\n  tertiary: {\n    default: {\n      dark: {\n        backgroundColor: \"#F4F4F4\",\n        color: \"#A0A0A0\"\n      }\n    }\n  }\n};\nconst iconSizeByBadgeSize = {\n  medium: 12,\n  small: 10\n};\nexport {\n  Badge\n};\n"],
  "mappings": "0JASA,IAAMA,EAAc,CAClB,gBAAiB,UACjB,MAAO,SACT,EACMC,EAAmB,CACvB,KAAAC,EACA,MAAAC,EACA,KAAAC,EACA,QAAAC,EACA,MAAAC,EACA,KAAAC,EACA,KAAAC,EACA,MAAAC,CACF,EACMC,GAA4B,OAAO,KAAKT,CAAgB,ECvB9D,IAAMU,EAA0B,CAACC,EAAiBC,IAC5C,OAAOD,GAAoB,SACtBA,EAELC,EACKD,EAAgB,QAElBA,EAAgB,QAEnBE,EAAoB,CAAC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SACZ,aAAc,MACd,WAAY,QACd,EACMF,EAAmB,CACvB,OAAQ,CACN,GAAGO,EAAW,GAAI,IAAK,SAAS,EAChC,QAAS,CACP,QAAS,UACT,eAAgB,iBAClB,CACF,EACA,MAAO,CACL,GAAGA,EAAW,GAAI,IAAK,MAAM,EAC7B,QAAS,CACP,QAAS,UACT,eAAgB,iBAClB,CACF,CACF,EACMhB,EAAsB,CAC1B,QAAS,CACP,QAAS,CACP,MAAO,CACL,gBAAiB,UACjB,MAAO,SACT,EACA,KAAM,CACJ,gBAAiB,UACjB,MAAO,SACT,CACF,EACA,YAAa,CACX,KAAM,CACJ,gBAAiB,UACjB,MAAO,SACT,CACF,EACA,SAAU,CACR,KAAM,CACJ,gBAAiB,UACjB,MAAO,SACT,CACF,EACA,SAAU,CACR,KAAM,CACJ,gBAAiB,UACjB,MAAO,SACT,CACF,CACF,EACA,UAAW,CACT,QAAS,CACP,KAAM,CACJ,gBAAiB,CACf,QAAS,UACT,QAAS,WACX,EACA,MAAO,CACL,QAAS,UACT,QAAS,SACX,CACF,CACF,EACA,YAAa,CACX,KAAM,CACJ,gBAAiB,YACjB,MAAO,SACT,CACF,EACA,SAAU,CACR,KAAM,CACJ,gBAAiB,YACjB,MAAO,SACT,CACF,EACA,SAAU,CACR,KAAM,CACJ,gBAAiB,YACjB,MAAO,SACT,CACF,CACF,EACA,SAAU,CACR,QAAS,CACP,KAAM,CACJ,gBAAiB,UACjB,MAAO,SACT,CACF,CACF,CACF,EACMe,EAAsB,CAC1B,OAAQ,GACR,MAAO,EACT",
  "names": ["UNSET_COLOR", "prefixIconAssets", "plus", "scrap", "lock", "lockOff", "heart", "bell", "gift", "share", "BADGE_PREFIX_ICON_OPTIONS", "getBadgeBackgroundColor", "backgroundColor", "isBlur", "getBadgeTextColor", "color", "Badge", "Y", "variant", "priority", "tone", "size", "isWhite", "isBlur", "prefixIcon", "label", "customBackgroundColor", "customTextColor", "style", "rest", "ref", "_a", "theme", "customizedBadgeColor", "configuredBadgeColors", "badgeStyleByVariant", "UNSET_COLOR", "backgroundColor", "color", "badgeBackgroundColor", "getBadgeBackgroundColor", "badgeTextColor", "getBadgeTextColor", "badgePadding", "badgeStyleBySize", "badgeStyle", "baseBadgeStyle", "u", "p", "Icon", "iconSizeByBadgeSize", "typography"]
}
