function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import * as React from 'react';
import { StyleSheet, View, Text } from 'react-native';
import { withTheme } from '../../core/theming';
const Divider = _ref => {
  let {
    style,
    theme,
    label,
    ...rest
  } = _ref;
  return /*#__PURE__*/React.createElement(React.Fragment, null, label ? /*#__PURE__*/React.createElement(View, {
    style: {
      flexDirection: 'row'
    }
  }, /*#__PURE__*/React.createElement(View, {
    style: [styles.divider, {
      flex: 1,
      alignSelf: 'center'
    }]
  }), /*#__PURE__*/React.createElement(Text, {
    style: [styles.label, {
      color: theme.colors.bg.muted
    }]
  }, label), /*#__PURE__*/React.createElement(View, {
    style: [styles.divider, {
      flex: 1,
      alignSelf: 'center'
    }]
  })) : /*#__PURE__*/React.createElement(View, _extends({}, rest, {
    style: [styles.divider, style]
  })));
};
const styles = StyleSheet.create({
  divider: {
    backgroundColor: '#CCCDD3',
    height: StyleSheet.hairlineWidth * 1,
    width: '100%'
  },
  label: {
    fontSize: 14,
    alignSelf: 'center',
    paddingHorizontal: 24,
    textTransform: 'uppercase'
  }
});
export default withTheme(Divider);
//# sourceMappingURL=Divider.js.map