{"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 classNames from 'classnames';\nimport RcSegmented from 'rc-segmented';\nimport * as React from 'react';\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 Segmented = /*#__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 [wrapSSR, hashId] = 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);\n  const mergedStyle = Object.assign(Object.assign({}, segmented === null || segmented === void 0 ? void 0 : segmented.style), style);\n  return wrapSSR( /*#__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});\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","classNames","RcSegmented","React","ConfigContext","useSize","useStyle","isSegmentedLabeledOptionWithIcon","option","icon","Segmented","forwardRef","props","ref","prefixCls","customizePrefixCls","className","rootClassName","block","options","size","customSize","style","restProps","getPrefixCls","direction","segmented","useContext","wrapSSR","hashId","mergedSize","extendedOptions","useMemo","map","label","restOption","assign","createElement","Fragment","cls","mergedStyle","process","env","NODE_ENV","displayName"],"sources":["/Users/chrishaack/UC_Trains_Voice/react-demo/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 classNames from 'classnames';\nimport RcSegmented from 'rc-segmented';\nimport * as React from 'react';\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 Segmented = /*#__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 [wrapSSR, hashId] = 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);\n  const mergedStyle = Object.assign(Object.assign({}, segmented === null || segmented === void 0 ? void 0 : segmented.style), style);\n  return wrapSSR( /*#__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});\nif (process.env.NODE_ENV !== 'production') {\n  Segmented.displayName = 'Segmented';\n}\nexport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