{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nconst _excluded = [\"index\", \"total\", \"style\", \"theme\"];\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 Image from \"react-native-web/dist/exports/Image\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport { getCardCoverStyle } from \"./utils\";\nimport { useInternalTheme } from \"../../core/theming\";\nimport { grey200 } from \"../../styles/themes/v2/colors\";\nimport { splitStyles } from \"../../utils/splitStyles\";\nconst CardCover = _ref => {\n  let {\n      index,\n      total,\n      style,\n      theme: themeOverrides\n    } = _ref,\n    rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n  const theme = useInternalTheme(themeOverrides);\n  const flattenedStyles = StyleSheet.flatten(style) || {};\n  const [, borderRadiusStyles] = splitStyles(flattenedStyles, style => style.startsWith('border') && style.endsWith('Radius'));\n  const coverStyle = getCardCoverStyle({\n    theme,\n    index,\n    total,\n    borderRadiusStyles\n  });\n  return React.createElement(View, {\n    style: [styles.container, coverStyle, style]\n  }, React.createElement(Image, _extends({}, rest, {\n    style: [styles.image, coverStyle],\n    accessibilityIgnoresInvertColors: true\n  })));\n};\nCardCover.displayName = 'Card.Cover';\nconst styles = StyleSheet.create({\n  container: {\n    height: 195,\n    backgroundColor: grey200,\n    overflow: 'hidden'\n  },\n  image: {\n    flex: 1,\n    height: undefined,\n    width: undefined,\n    justifyContent: 'flex-end'\n  }\n});\nexport default CardCover;\nexport { CardCover };","map":{"version":3,"names":["React","Image","StyleSheet","View","getCardCoverStyle","useInternalTheme","grey200","splitStyles","CardCover","_ref","index","total","style","theme","themeOverrides","rest","_objectWithoutPropertiesLoose","_excluded","flattenedStyles","flatten","borderRadiusStyles","startsWith","endsWith","coverStyle","createElement","styles","container","_extends","image","accessibilityIgnoresInvertColors","displayName","create","height","backgroundColor","overflow","flex","undefined","width","justifyContent"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Card/CardCover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Image, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { getCardCoverStyle } from './utils';\nimport { useInternalTheme } from '../../core/theming';\nimport { grey200 } from '../../styles/themes/v2/colors';\nimport type { ThemeProp } from '../../types';\nimport { splitStyles } from '../../utils/splitStyles';\n\nexport type Props = React.ComponentPropsWithRef<typeof Image> & {\n  /**\n   * @internal\n   */\n  index?: number;\n  /**\n   * @internal\n   */\n  total?: number;\n  style?: StyleProp<ViewStyle>;\n  /**\n   * @optional\n   */\n  theme?: ThemeProp;\n};\n\n/**\n * A component to show a cover image inside a Card.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Card } from 'react-native-paper';\n *\n * const MyComponent = () => (\n *   <Card>\n *     <Card.Cover source={{ uri: 'https://picsum.photos/700' }} />\n *   </Card>\n * );\n *\n * export default MyComponent;\n * ```\n *\n * @extends Image props https://reactnative.dev/docs/image#props\n */\nconst CardCover = ({\n  index,\n  total,\n  style,\n  theme: themeOverrides,\n  ...rest\n}: Props) => {\n  const theme = useInternalTheme(themeOverrides);\n\n  const flattenedStyles = (StyleSheet.flatten(style) || {}) as ViewStyle;\n  const [, borderRadiusStyles] = splitStyles(\n    flattenedStyles,\n    (style) => style.startsWith('border') && style.endsWith('Radius')\n  );\n\n  const coverStyle = getCardCoverStyle({\n    theme,\n    index,\n    total,\n    borderRadiusStyles,\n  });\n\n  return (\n    <View style={[styles.container, coverStyle, style]}>\n      <Image\n        {...rest}\n        style={[styles.image, coverStyle]}\n        accessibilityIgnoresInvertColors\n      />\n    </View>\n  );\n};\n\nCardCover.displayName = 'Card.Cover';\nconst styles = StyleSheet.create({\n  container: {\n    height: 195,\n    backgroundColor: grey200,\n    overflow: 'hidden',\n  },\n  image: {\n    flex: 1,\n    height: undefined,\n    width: undefined,\n    justifyContent: 'flex-end',\n  },\n});\n\nexport default CardCover;\n\n// @component-docs ignore-next-line\nexport { CardCover };\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,KAAA;AAAA,OAAAC,UAAA;AAAA,OAAAC,IAAA;AAG9B,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AACzB,SAASC,OAAO;AAEhB,SAASC,WAAW;AAqCpB,MAAMC,SAAS,GAAGC,IAAA,IAML;EAAA,IANM;MACjBC,KAAK;MACLC,KAAK;MACLC,KAAK;MACLC,KAAK,EAAEC;IAEF,CAAC,GAAAL,IAAA;IADHM,IAAA,GAAAC,6BAAA,CAAAP,IAAA,EAAAQ,SAAA;EAEH,MAAMJ,KAAK,GAAGR,gBAAgB,CAACS,cAAc,CAAC;EAE9C,MAAMI,eAAe,GAAIhB,UAAU,CAACiB,OAAO,CAACP,KAAK,CAAC,IAAI,CAAC,CAAe;EACtE,MAAM,GAAGQ,kBAAkB,CAAC,GAAGb,WAAW,CACxCW,eAAe,EACdN,KAAK,IAAKA,KAAK,CAACS,UAAU,CAAC,QAAQ,CAAC,IAAIT,KAAK,CAACU,QAAQ,CAAC,QAAQ,CAClE,CAAC;EAED,MAAMC,UAAU,GAAGnB,iBAAiB,CAAC;IACnCS,KAAK;IACLH,KAAK;IACLC,KAAK;IACLS;EACF,CAAC,CAAC;EAEF,OACEpB,KAAA,CAAAwB,aAAA,CAACrB,IAAI;IAACS,KAAK,EAAE,CAACa,MAAM,CAACC,SAAS,EAAEH,UAAU,EAAEX,KAAK;EAAE,GACjDZ,KAAA,CAAAwB,aAAA,CAACvB,KAAK,EAAA0B,QAAA,KACAZ,IAAI;IACRH,KAAK,EAAE,CAACa,MAAM,CAACG,KAAK,EAAEL,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