{"ast":null,"code":"\"use client\";\n\nimport * as React from 'react';\nimport CheckOutlined from \"@ant-design/icons/es/icons/CheckOutlined\";\nimport CopyOutlined from \"@ant-design/icons/es/icons/CopyOutlined\";\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport TransButton from '../../_util/transButton';\nimport Tooltip from '../../tooltip';\nimport { getNode, toList } from './util';\nconst CopyBtn = props => {\n const {\n prefixCls,\n copied,\n locale,\n iconOnly,\n tooltips,\n icon,\n loading: btnLoading,\n tabIndex,\n onCopy\n } = props;\n const tooltipNodes = toList(tooltips);\n const iconNodes = toList(icon);\n const {\n copied: copiedText,\n copy: copyText\n } = locale !== null && locale !== void 0 ? locale : {};\n const copyTitle = copied ? getNode(tooltipNodes[1], copiedText) : getNode(tooltipNodes[0], copyText);\n const systemStr = copied ? copiedText : copyText;\n const ariaLabel = typeof copyTitle === 'string' ? copyTitle : systemStr;\n return /*#__PURE__*/React.createElement(Tooltip, {\n key: \"copy\",\n title: copyTitle\n }, /*#__PURE__*/React.createElement(TransButton, {\n className: classNames(`${prefixCls}-copy`, {\n [`${prefixCls}-copy-success`]: copied,\n [`${prefixCls}-copy-icon-only`]: iconOnly\n }),\n onClick: onCopy,\n \"aria-label\": ariaLabel,\n tabIndex: tabIndex\n }, copied ? getNode(iconNodes[1], /*#__PURE__*/React.createElement(CheckOutlined, null), true) : getNode(iconNodes[0], btnLoading ? /*#__PURE__*/React.createElement(LoadingOutlined, null) : /*#__PURE__*/React.createElement(CopyOutlined, null), true)));\n};\nexport default CopyBtn;","map":{"version":3,"names":["React","CheckOutlined","CopyOutlined","LoadingOutlined","classNames","TransButton","Tooltip","getNode","toList","CopyBtn","props","prefixCls","copied","locale","iconOnly","tooltips","icon","loading","btnLoading","tabIndex","onCopy","tooltipNodes","iconNodes","copiedText","copy","copyText","copyTitle","systemStr","ariaLabel","createElement","key","title","className","onClick"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/typography/Base/CopyBtn.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport CheckOutlined from \"@ant-design/icons/es/icons/CheckOutlined\";\nimport CopyOutlined from \"@ant-design/icons/es/icons/CopyOutlined\";\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport TransButton from '../../_util/transButton';\nimport Tooltip from '../../tooltip';\nimport { getNode, toList } from './util';\nconst CopyBtn = props => {\n const {\n prefixCls,\n copied,\n locale,\n iconOnly,\n tooltips,\n icon,\n loading: btnLoading,\n tabIndex,\n onCopy\n } = props;\n const tooltipNodes = toList(tooltips);\n const iconNodes = toList(icon);\n const {\n copied: copiedText,\n copy: copyText\n } = locale !== null && locale !== void 0 ? locale : {};\n const copyTitle = copied ? getNode(tooltipNodes[1], copiedText) : getNode(tooltipNodes[0], copyText);\n const systemStr = copied ? copiedText : copyText;\n const ariaLabel = typeof copyTitle === 'string' ? copyTitle : systemStr;\n return /*#__PURE__*/React.createElement(Tooltip, {\n key: \"copy\",\n title: copyTitle\n }, /*#__PURE__*/React.createElement(TransButton, {\n className: classNames(`${prefixCls}-copy`, {\n [`${prefixCls}-copy-success`]: copied,\n [`${prefixCls}-copy-icon-only`]: iconOnly\n }),\n onClick: onCopy,\n \"aria-label\": ariaLabel,\n tabIndex: tabIndex\n }, copied ? getNode(iconNodes[1], /*#__PURE__*/React.createElement(CheckOutlined, null), true) : getNode(iconNodes[0], btnLoading ? /*#__PURE__*/React.createElement(LoadingOutlined, null) : /*#__PURE__*/React.createElement(CopyOutlined, null), true)));\n};\nexport default CopyBtn;"],"mappings":"AAAA,YAAY;;AAEZ,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC,YAAY,MAAM,yCAAyC;AAClE,OAAOC,eAAe,MAAM,4CAA4C;AACxE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,WAAW,MAAM,yBAAyB;A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