{"ast":null,"code":"\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { isPresetColor } from '../_util/colors';\nimport { ConfigContext } from '../config-provider';\nimport useStyle from './style/ribbon';\nconst Ribbon = props => {\n  const {\n    className,\n    prefixCls: customizePrefixCls,\n    style,\n    color,\n    children,\n    text,\n    placement = 'end',\n    rootClassName\n  } = props;\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const prefixCls = getPrefixCls('ribbon', customizePrefixCls);\n  const wrapperCls = \"\".concat(prefixCls, \"-wrapper\");\n  const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, wrapperCls);\n  const colorInPreset = isPresetColor(color, false);\n  const ribbonCls = classNames(prefixCls, \"\".concat(prefixCls, \"-placement-\").concat(placement), {\n    [\"\".concat(prefixCls, \"-rtl\")]: direction === 'rtl',\n    [\"\".concat(prefixCls, \"-color-\").concat(color)]: colorInPreset\n  }, className);\n  const colorStyle = {};\n  const cornerColorStyle = {};\n  if (color && !colorInPreset) {\n    colorStyle.background = color;\n    cornerColorStyle.color = color;\n  }\n  return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(wrapperCls, rootClassName, hashId, cssVarCls)\n  }, children, /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(ribbonCls, hashId),\n    style: Object.assign(Object.assign({}, colorStyle), style)\n  }, /*#__PURE__*/React.createElement(\"span\", {\n    className: \"\".concat(prefixCls, \"-text\")\n  }, text), /*#__PURE__*/React.createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-corner\"),\n    style: cornerColorStyle\n  }))));\n};\nif (process.env.NODE_ENV !== 'production') {\n  Ribbon.displayName = 'Ribbon';\n}\nexport default Ribbon;","map":{"version":3,"names":["React","classNames","isPresetColor","ConfigContext","useStyle","Ribbon","props","className","prefixCls","customizePrefixCls","style","color","children","text","placement","rootClassName","getPrefixCls","direction","useContext","wrapperCls","concat","wrapCSSVar","hashId","cssVarCls","colorInPreset","ribbonCls","colorStyle","cornerColorStyle","background","createElement","Object","assign","process","env","NODE_ENV","displayName"],"sources":["/opt/bitnami/apache/htdocs/setu_beta_game/node_modules/antd/es/badge/Ribbon.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { isPresetColor } from '../_util/colors';\nimport { ConfigContext } from '../config-provider';\nimport useStyle from './style/ribbon';\nconst Ribbon = props => {\n  const {\n    className,\n    prefixCls: customizePrefixCls,\n    style,\n    color,\n    children,\n    text,\n    placement = 'end',\n    rootClassName\n  } = props;\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const prefixCls = getPrefixCls('ribbon', customizePrefixCls);\n  const wrapperCls = `${prefixCls}-wrapper`;\n  const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, wrapperCls);\n  const colorInPreset = isPresetColor(color, false);\n  const ribbonCls = classNames(prefixCls, `${prefixCls}-placement-${placement}`, {\n    [`${prefixCls}-rtl`]: direction === 'rtl',\n    [`${prefixCls}-color-${color}`]: colorInPreset\n  }, className);\n  const colorStyle = {};\n  const cornerColorStyle = {};\n  if (color && !colorInPreset) {\n    colorStyle.background = color;\n    cornerColorStyle.color = color;\n  }\n  return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(wrapperCls, rootClassName, hashId, cssVarCls)\n  }, children, /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(ribbonCls, hashId),\n    style: Object.assign(Object.assign({}, colorStyle), style)\n  }, /*#__PURE__*/React.createElement(\"span\", {\n    className: `${prefixCls}-text`\n  }, text), /*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-corner`,\n    style: cornerColorStyle\n  }))));\n};\nif (process.env.NODE_ENV !== 'production') {\n  Ribbon.displayName = 'Ribbon';\n}\nexport default Ribbon;"],"mappings":"AAAA,YAAY;;AAEZ,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;A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