{"ast":null,"code":"'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport * as SwitchPrimitive from '@radix-ui/react-switch';\nimport { switchPropDefs } from './switch.props';\nimport { extractMarginProps, withMarginProps, withBreakpoints } from '../helpers';\nconst Switch = React.forwardRef((props, forwardedRef) => {\n  const {\n    rest: marginRest,\n    ...marginProps\n  } = extractMarginProps(props);\n  const {\n    className,\n    style,\n    size = switchPropDefs.size.default,\n    variant = switchPropDefs.variant.default,\n    color = switchPropDefs.color.default,\n    highContrast = switchPropDefs.highContrast.default,\n    radius = switchPropDefs.radius.default,\n    ...switchProps\n  } = marginRest;\n  return React.createElement(\"span\", {\n    \"data-radius\": radius,\n    className: classNames('rt-SwitchRoot', className, withBreakpoints(size, 'rt-r-size'), `rt-variant-${variant}`, {\n      'rt-high-contrast': highContrast\n    }, withMarginProps(marginProps)),\n    style: style\n  }, React.createElement(SwitchPrimitive.Root, {\n    \"data-accent-color\": color,\n    ...switchProps,\n    ref: forwardedRef,\n    className: \"rt-reset-button rt-SwitchButton\"\n  }, React.createElement(SwitchPrimitive.Thumb, {\n    className: \"rt-SwitchThumb\"\n  })));\n});\nSwitch.displayName = 'Switch';\nexport { Switch };","map":{"version":3,"names":["React","classNames","SwitchPrimitive","switchPropDefs","extractMarginProps","withMarginProps","withBreakpoints","Switch","forwardRef","props","forwardedRef","rest","marginRest","marginProps","className","style","size","default","variant","color","highContrast","radius","switchProps","createElement","Root","ref","Thumb","displayName"],"sources":["../../../src/components/switch.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAY;;AAEZ,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,eAAe,MAAM,wBAAwB;AACzD,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,kBAAkB,EAAEC,eAAe,EAAEC,eAAe,QAAQ,YAAY;AAUjF,MAAMC,MAAM,GAAGP,KAAK,CAACQ,UAAU,CAA6B,CAACC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