{"ast":null,"code":"\"use strict\";\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nconst _excluded = [\"screen\", \"params\", \"action\", \"href\"],\n  _excluded2 = [\"variant\", \"color\", \"android_ripple\", \"style\", \"children\"];\nimport { useLinkProps, useTheme } from '@react-navigation/native';\nimport Color from 'color';\nimport * as React from 'react';\nimport Platform from \"react-native-web/dist/exports/Platform\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport { PlatformPressable } from \"./PlatformPressable.js\";\nimport { Text } from \"./Text.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst BUTTON_RADIUS = 40;\nexport function Button(props) {\n  if ('screen' in props || 'action' in props) {\n    return _jsx(ButtonLink, Object.assign({}, props));\n  } else {\n    return _jsx(ButtonBase, Object.assign({}, props));\n  }\n}\nfunction ButtonLink(_ref) {\n  let {\n      screen,\n      params,\n      action,\n      href\n    } = _ref,\n    rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n  const props = useLinkProps({\n    screen,\n    params,\n    action,\n    href\n  });\n  return _jsx(ButtonBase, Object.assign({}, rest, props));\n}\nfunction ButtonBase(_ref2) {\n  let {\n      variant = 'tinted',\n      color: customColor,\n      android_ripple,\n      style,\n      children\n    } = _ref2,\n    rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n  const {\n    colors,\n    fonts\n  } = useTheme();\n  const color = customColor ?? colors.primary;\n  let backgroundColor;\n  let textColor;\n  switch (variant) {\n    case 'plain':\n      backgroundColor = 'transparent';\n      textColor = color;\n      break;\n    case 'tinted':\n      backgroundColor = Color(color).fade(0.85).string();\n      textColor = color;\n      break;\n    case 'filled':\n      backgroundColor = color;\n      textColor = Color(color).isDark() ? 'white' : Color(color).darken(0.71).string();\n      break;\n  }\n  return _jsx(PlatformPressable, Object.assign({}, rest, {\n    android_ripple: Object.assign({\n      radius: BUTTON_RADIUS,\n      color: Color(textColor).fade(0.85).string()\n    }, android_ripple),\n    pressOpacity: Platform.OS === 'ios' ? undefined : 1,\n    hoverEffect: {\n      color: textColor\n    },\n    style: [{\n      backgroundColor\n    }, styles.button, style],\n    children: _jsx(Text, {\n      style: [{\n        color: textColor\n      }, fonts.regular, styles.text],\n      children: children\n    })\n  }));\n}\nconst styles = StyleSheet.create({\n  button: {\n    paddingHorizontal: 24,\n    paddingVertical: 10,\n    borderRadius: BUTTON_RADIUS\n  },\n  text: {\n    fontSize: 14,\n    lineHeight: 20,\n    letterSpacing: 0.1,\n    textAlign: 'center'\n  }\n});","map":{"version":3,"names":["useLinkProps","useTheme","Color","React","Platform","StyleSheet","PlatformPressable","Text","jsx","_jsx","BUTTON_RADIUS","Button","props","ButtonLink","Object","assign","ButtonBase","_ref","screen","params","action","href","rest","_objectWithoutPropertiesLoose","_excluded","_ref2","variant","color","customColor","android_ripple","style","children","_excluded2","colors","fonts","primary","backgroundColor","textColor","fade","string","isDark","darken","radius","pressOpacity","OS","undefined","hoverEffect","styles","button","regular","text","create","paddingHorizontal","paddingVertical","borderRadius","fontSize","lineHeight","letterSpacing","textAlign"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/@react-navigation/elements/src/Button.tsx"],"sourcesContent":["import {\n  type LinkProps,\n  useLinkProps,\n  useTheme,\n} from '@react-navigation/native';\nimport Color from 'color';\nimport * as React from 'react';\nimport { Platform, StyleSheet } from 'react-native';\n\nimport {\n  PlatformPressable,\n  type Props as PlatformPressableProps,\n} from './PlatformPressable';\nimport { Text } from './Text';\n\ntype ButtonBaseProps = Omit<PlatformPressableProps, 'children'> & {\n  variant?: 'plain' | 'tinted' | 'filled';\n  color?: string;\n  children: string | string[];\n};\n\ntype ButtonLinkProps<ParamList extends ReactNavigation.RootParamList> =\n  LinkProps<ParamList> & Omit<ButtonBaseProps, 'onPress'>;\n\nconst BUTTON_RADIUS = 40;\n\nexport function Button<ParamList extends ReactNavigation.RootParamList>(\n  props: ButtonLinkProps<ParamList>\n): React.JSX.Element;\n\nexport function Button(props: ButtonBaseProps): React.JSX.Element;\n\nexport function Button<ParamList extends ReactNavigation.RootParamList>(\n  props: ButtonBaseProps | ButtonLinkProps<ParamList>\n) {\n  if ('screen' in props || 'action' in props) {\n    // @ts-expect-error: This is already type-checked by the prop types\n    return <ButtonLink {...props} />;\n  } else {\n    return <ButtonBase {...props} />;\n  }\n}\n\nfunction ButtonLink<ParamList extends ReactNavigation.RootParamList>({\n  screen,\n  params,\n  action,\n  href,\n  ...rest\n}: ButtonLinkProps<ParamList>) {\n  // @ts-expect-error: This is already type-checked by the prop types\n  const props = useLinkProps({ screen, params, action, href });\n\n  return <ButtonBase {...rest} {...props} />;\n}\n\nfunction ButtonBase({\n  variant = 'tinted',\n  color: customColor,\n  android_ripple,\n  style,\n  children,\n  ...rest\n}: ButtonBaseProps) {\n  const { colors, fonts } = useTheme();\n\n  const color = customColor ?? colors.primary;\n\n  let backgroundColor;\n  let textColor;\n\n  switch (variant) {\n    case 'plain':\n      backgroundColor = 'transparent';\n      textColor = color;\n      break;\n    case 'tinted':\n      backgroundColor = Color(color).fade(0.85).string();\n      textColor = color;\n      break;\n    case 'filled':\n      backgroundColor = color;\n      textColor = Color(color).isDark()\n        ? 'white'\n        : Color(color).darken(0.71).string();\n      break;\n  }\n\n  return (\n    <PlatformPressable\n      {...rest}\n      android_ripple={{\n        radius: BUTTON_RADIUS,\n        color: Color(textColor).fade(0.85).string(),\n        ...android_ripple,\n      }}\n      pressOpacity={Platform.OS === 'ios' ? undefined : 1}\n      hoverEffect={{ color: textColor }}\n      style={[{ backgroundColor }, styles.button, style]}\n    >\n      <Text style={[{ color: textColor }, fonts.regular, styles.text]}>\n        {children}\n      </Text>\n    </PlatformPressable>\n  );\n}\n\nconst styles = StyleSheet.create({\n  button: {\n    paddingHorizontal: 24,\n    paddingVertical: 10,\n    borderRadius: BUTTON_RADIUS,\n  },\n  text: {\n    fontSize: 14,\n    lineHeight: 20,\n    letterSpacing: 0.1,\n    textAlign: 'center',\n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