{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nconst _excluded = [\"icon\", \"size\", \"style\", \"theme\"],\n  _excluded2 = [\"backgroundColor\"];\nfunction _extends() {\n  return _extends = Object.assign ? Object.assign.bind() : function (n) {\n    for (var e = 1; e < arguments.length; e++) {\n      var t = arguments[e];\n      for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n    }\n    return n;\n  }, _extends.apply(null, arguments);\n}\nimport * as React from 'react';\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport { useInternalTheme } from \"../../core/theming\";\nimport { white } from \"../../styles/themes/v2/colors\";\nimport getContrastingColor from \"../../utils/getContrastingColor\";\nimport Icon from \"../Icon\";\nconst defaultSize = 64;\nconst Avatar = _ref => {\n  let {\n      icon,\n      size = defaultSize,\n      style,\n      theme: themeOverrides\n    } = _ref,\n    rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n  var _theme$colors;\n  const theme = useInternalTheme(themeOverrides);\n  const _ref2 = StyleSheet.flatten(style) || {},\n    {\n      backgroundColor = (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.primary\n    } = _ref2,\n    restStyle = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n  const textColor = rest.color ?? getContrastingColor(backgroundColor, white, 'rgba(0, 0, 0, .54)');\n  return React.createElement(View, _extends({\n    style: [{\n      width: size,\n      height: size,\n      borderRadius: size / 2,\n      backgroundColor\n    }, styles.container, restStyle]\n  }, rest), React.createElement(Icon, {\n    source: icon,\n    color: textColor,\n    size: size * 0.6\n  }));\n};\nAvatar.displayName = 'Avatar.Icon';\nconst styles = StyleSheet.create({\n  container: {\n    justifyContent: 'center',\n    alignItems: 'center'\n  }\n});\nexport default Avatar;","map":{"version":3,"names":["React","StyleSheet","View","useInternalTheme","white","getContrastingColor","Icon","defaultSize","Avatar","_ref","icon","size","style","theme","themeOverrides","rest","_objectWithoutPropertiesLoose","_excluded","_theme$colors","_ref2","flatten","backgroundColor","colors","primary","restStyle","_excluded2","textColor","color","createElement","_extends","width","height","borderRadius","styles","container","source","displayName","create","justifyContent","alignItems"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Avatar/AvatarIcon.tsx"],"sourcesContent":["import * as React from 'react';\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { useInternalTheme } from '../../core/theming';\nimport { white } from '../../styles/themes/v2/colors';\nimport type { ThemeProp } from '../../types';\nimport getContrastingColor from '../../utils/getContrastingColor';\nimport Icon, { IconSource } from '../Icon';\n\nconst defaultSize = 64;\n\nexport type Props = React.ComponentPropsWithRef<typeof View> & {\n  /**\n   * Icon to display for the `Avatar`.\n   */\n  icon: IconSource;\n  /**\n   * Size of the avatar.\n   */\n  size?: number;\n  /**\n   * Custom color for the icon.\n   */\n  color?: string;\n  style?: StyleProp<ViewStyle>;\n  /**\n   * @optional\n   */\n  theme?: ThemeProp;\n};\n\n/**\n * Avatars can be used to represent people in a graphical way.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Avatar } from 'react-native-paper';\n *\n * const MyComponent = () => (\n *   <Avatar.Icon size={24} icon=\"folder\" />\n * );\n * ```\n */\nconst Avatar = ({\n  icon,\n  size = defaultSize,\n  style,\n  theme: themeOverrides,\n  ...rest\n}: Props) => {\n  const theme = useInternalTheme(themeOverrides);\n  const { backgroundColor = theme.colors?.primary, ...restStyle } =\n    StyleSheet.flatten(style) || {};\n  const textColor =\n    rest.color ??\n    getContrastingColor(backgroundColor, white, 'rgba(0, 0, 0, .54)');\n\n  return (\n    <View\n      style={[\n        {\n          width: size,\n          height: size,\n          borderRadius: size / 2,\n          backgroundColor,\n        },\n        styles.container,\n        restStyle,\n      ]}\n      {...rest}\n    >\n      <Icon source={icon} color={textColor} size={size * 0.6} />\n    </View>\n  );\n};\n\nAvatar.displayName = 'Avatar.Icon';\n\nconst styles = StyleSheet.create({\n  container: {\n    justifyContent: 'center',\n    alignItems: 'center',\n  },\n});\n\nexport default Avatar;\n"],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,UAAA;AAAA,OAAAC,IAAA;AAG9B,SAASC,gBAAgB;AACzB,SAASC,KAAK;AAEd,OAAOC,mBAAmB;AAC1B,OAAOC,IAAI;AAEX,MAAMC,WAAW,GAAG,EAAE;AAmCtB,MAAMC,MAAM,GAAGC,IAAA,IAMF;EAAA,IANG;MACdC,IAAI;MACJC,IAAI,GAAGJ,WAAW;MAClBK,KAAK;MACLC,KAAK,EAAEC;IAEF,CAAC,GAAAL,IAAA;IADHM,IAAA,GAAAC,6BAAA,CAAAP,IAAA,EAAAQ,SAAA;EACQ,IAAAC,aAAA;EACX,MAAML,KAAK,GAAGV,gBAAgB,CAACW,cAAc,CAAC;EAC9C,MAAAK,KAAA,GACElB,UAAU,CAACmB,OAAO,CAACR,KAAK,CAAC,IAAI,CAAC,CAAC;IAD3B;MAAES,eAAe,IAAAH,aAAA,GAAGL,KAAK,CAACS,MAAM,cAAAJ,aAAA,uBAAZA,aAAA,CAAcK;IAAsB,CAAC,GAAAJ,KAAA;IAAXK,SAAA,GAAAR,6BAAA,CAAAG,KAAA,EAAAM,UAAA;EAEpD,MAAMC,SAAS,GACbX,IAAI,CAACY,KAAK,IACVtB,mBAAmB,CAACgB,eAAe,EAAEjB,KAAK,EAAE,oBAAoB,CAAC;EAEnE,OACEJ,KAAA,CAAA4B,aAAA,CAAC1B,IAAI,EAAA2B,QAAA;IACHjB,KAAK,EAAE,CACL;MACEkB,KAAK,EAAEnB,IAAI;MACXoB,MAAM,EAAEpB,IAAI;MACZqB,YAAY,EAAErB,IAAI,GAAG,CAAC;MACtBU;IACF,CAAC,EACDY,MAAM,CAACC,SAAS,EAChBV,SAAS;EACT,GACET,IAAI,GAERf,KAAA,CAAA4B,aAAA,CAACtB,IAAI;IAAC6B,MAAM,EAAEzB,IAAK;IAACiB,KAAK,EAAED,SAAU;IAACf,IAAI,EAAEA,IAAI,GAAG;EAAI,CAAE,CACrD,CAAC;AAEX,CAAC;AAEDH,MAAM,CAAC4B,WAAW,GAAG,aAAa;AAElC,MAAMH,MAAM,GAAGhC,UAAU,CAACoC,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAe/B,MAAM","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}