{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nconst _excluded = [\"theme\", \"style\", \"children\"];\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\";\nconst CardActions = _ref => {\n  let {\n      theme,\n      style,\n      children\n    } = _ref,\n    rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n  const {\n    isV3\n  } = useInternalTheme(theme);\n  const justifyContent = isV3 ? 'flex-end' : 'flex-start';\n  const containerStyle = [styles.container, {\n    justifyContent\n  }, style];\n  return React.createElement(View, _extends({}, rest, {\n    style: containerStyle\n  }), React.Children.map(children, (child, index) => {\n    if (!React.isValidElement(child)) {\n      return child;\n    }\n    const compact = !isV3 && child.props.compact !== false;\n    const mode = child.props.mode ?? (isV3 ? index === 0 ? 'outlined' : 'contained' : undefined);\n    const childStyle = [isV3 && styles.button, child.props.style];\n    return React.cloneElement(child, Object.assign({}, child.props, {\n      compact,\n      mode,\n      style: childStyle\n    }));\n  }));\n};\nCardActions.displayName = 'Card.Actions';\nconst styles = StyleSheet.create({\n  container: {\n    flexDirection: 'row',\n    alignItems: 'center',\n    padding: 8\n  },\n  button: {\n    marginLeft: 8\n  }\n});\nexport default CardActions;","map":{"version":3,"names":["React","StyleSheet","View","useInternalTheme","CardActions","_ref","theme","style","children","rest","_objectWithoutPropertiesLoose","_excluded","isV3","justifyContent","containerStyle","styles","container","createElement","_extends","Children","map","child","index","isValidElement","compact","props","mode","undefined","childStyle","button","cloneElement","Object","assign","displayName","create","flexDirection","alignItems","padding","marginLeft"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Card/CardActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport type { ThemeProp } from 'src/types';\n\nimport { CardActionChildProps } from './utils';\nimport { useInternalTheme } from '../../core/theming';\n\nexport type Props = React.ComponentPropsWithRef<typeof View> & {\n  /**\n   * Items inside the `CardActions`.\n   */\n  children: React.ReactNode;\n  style?: StyleProp<ViewStyle>;\n  theme?: ThemeProp;\n};\n\n/**\n * A component to show a list of actions inside a Card.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Card, Button } from 'react-native-paper';\n *\n * const MyComponent = () => (\n *   <Card>\n *     <Card.Actions>\n *       <Button>Cancel</Button>\n *       <Button>Ok</Button>\n *     </Card.Actions>\n *   </Card>\n * );\n *\n * export default MyComponent;\n * ```\n */\nconst CardActions = ({ theme, style, children, ...rest }: Props) => {\n  const { isV3 } = useInternalTheme(theme);\n\n  const justifyContent = (\n    isV3 ? 'flex-end' : 'flex-start'\n  ) as ViewStyle['justifyContent'];\n  const containerStyle = [styles.container, { justifyContent }, style];\n\n  return (\n    <View {...rest} style={containerStyle}>\n      {React.Children.map(children, (child, index) => {\n        if (!React.isValidElement<CardActionChildProps>(child)) {\n          return child;\n        }\n\n        const compact = !isV3 && child.props.compact !== false;\n        const mode =\n          child.props.mode ??\n          (isV3 ? (index === 0 ? 'outlined' : 'contained') : undefined);\n        const childStyle = [isV3 && styles.button, child.props.style];\n\n        return React.cloneElement(child, {\n          ...child.props,\n          compact,\n          mode,\n          style: childStyle,\n        });\n      })}\n    </View>\n  );\n};\n\nCardActions.displayName = 'Card.Actions';\n\nconst styles = StyleSheet.create({\n  container: {\n    flexDirection: 'row',\n    alignItems: 'center',\n    padding: 8,\n  },\n  button: {\n    marginLeft: 8,\n  },\n});\n\nexport default CardActions;\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAA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