{"ast":null,"code":"\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport RcSegmented from 'rc-segmented';\nimport { ConfigContext } from '../config-provider';\nimport useSize from '../config-provider/hooks/useSize';\nimport useStyle from './style';\nfunction isSegmentedLabeledOptionWithIcon(option) {\n return typeof option === 'object' && !!(option === null || option === void 0 ? void 0 : option.icon);\n}\nconst InternalSegmented = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n block,\n options = [],\n size: customSize = 'middle',\n style\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"block\", \"options\", \"size\", \"style\"]);\n const {\n getPrefixCls,\n direction,\n segmented\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('segmented', customizePrefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n // ===================== Size =====================\n const mergedSize = useSize(customSize);\n // syntactic sugar to support `icon` for Segmented Item\n const extendedOptions = React.useMemo(() => options.map(option => {\n if (isSegmentedLabeledOptionWithIcon(option)) {\n const {\n icon,\n label\n } = option,\n restOption = __rest(option, [\"icon\", \"label\"]);\n return Object.assign(Object.assign({}, restOption), {\n label: ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-item-icon`\n }, icon), label && /*#__PURE__*/React.createElement(\"span\", null, label)))\n });\n }\n return option;\n }), [options, prefixCls]);\n const cls = classNames(className, rootClassName, segmented === null || segmented === void 0 ? void 0 : segmented.className, {\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-sm`]: mergedSize === 'small',\n [`${prefixCls}-lg`]: mergedSize === 'large'\n }, hashId, cssVarCls);\n const mergedStyle = Object.assign(Object.assign({}, segmented === null || segmented === void 0 ? void 0 : segmented.style), style);\n return wrapCSSVar( /*#__PURE__*/React.createElement(RcSegmented, Object.assign({}, restProps, {\n className: cls,\n style: mergedStyle,\n options: extendedOptions,\n ref: ref,\n prefixCls: prefixCls,\n direction: direction\n })));\n});\nconst Segmented = InternalSegmented;\nif (process.env.NODE_ENV !== 'production') {\n Segmented.displayName = 'Segmented';\n}\nexport default Segmented;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","RcSegmented","ConfigContext","useSize","useStyle","isSegmentedLabeledOptionWithIcon","option","icon","InternalSegmented","forwardRef","props","ref","prefixCls","customizePrefixCls","className","rootClassName","block","options","size","customSize","style","restProps","getPrefixCls","direction","segmented","useContext","wrapCSSVar","hashId","cssVarCls","mergedSize","extendedOptions","useMemo","map","label","restOption","assign","createElement","Fragment","cls","mergedStyle","Segmented","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/segmented/index.js"],"sourcesContent":["\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport RcSegmented from 'rc-segmented';\nimport { ConfigContext } from '../config-provider';\nimport useSize from '../config-provider/hooks/useSize';\nimport useStyle from './style';\nfunction isSegmentedLabeledOptionWithIcon(option) {\n return typeof option === 'object' && !!(option === null || option === void 0 ? void 0 : option.icon);\n}\nconst InternalSegmented = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n block,\n options = [],\n size: customSize = 'middle',\n style\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"block\", \"options\", \"size\", \"style\"]);\n const {\n getPrefixCls,\n direction,\n segmented\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('segmented', customizePrefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n // ===================== Size =====================\n const mergedSize = useSize(customSize);\n // syntactic sugar to support `icon` for Segmented Item\n const extendedOptions = React.useMemo(() => options.map(option => {\n if (isSegmentedLabeledOptionWithIcon(option)) {\n const {\n icon,\n label\n } = option,\n restOption = __rest(option, [\"icon\", \"label\"]);\n return Object.assign(Object.assign({}, restOption), {\n label: ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-item-icon`\n }, icon), label && /*#__PURE__*/React.createElement(\"span\", null, label)))\n });\n }\n return option;\n }), [options, prefixCls]);\n const cls = classNames(className, rootClassName, segmented === null || segmented === void 0 ? void 0 : segmented.className, {\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-sm`]: mergedSize === 'small',\n [`${prefixCls}-lg`]: mergedSize === 'large'\n }, hashId, cssVarCls);\n const mergedStyle = Object.assign(Object.assign({}, segmented === null || segmented === void 0 ? void 0 : segmented.style), style);\n return wrapCSSVar( /*#__PURE__*/React.createElement(RcSegmented, Object.assign({}, restProps, {\n className: cls,\n style: mergedStyle,\n options: extendedOptions,\n ref: ref,\n prefixCls: prefixCls,\n direction: direction\n })));\n});\nconst Segmented = InternalSegmented;\nif (process.env.NODE_ENV !== 'production') {\n Segmented.displayName = 'Segmented';\n}\nexport default Segmented;"],"mappings":"AAAA,YAAY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