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 React from 'react';
import { Modal, View, Text, TouchableOpacity } from 'react-native';
import { Image } from 'react-native';
import styles from './styles';
const DialogueConfirm = props => {
  const {
    children,
    title,
    confirmLabel,
    confirmOnPress,
    confirmDisable,
    closeLabel,
    closeOnPress,
    closeDisable,
    ...rest
  } = props;
  return /*#__PURE__*/React.createElement(Modal, _extends({
    animationType: "fade",
    visible: true,
    transparent: true
  }, rest), /*#__PURE__*/React.createElement(View, {
    style: styles.container
  }, /*#__PURE__*/React.createElement(View, {
    style: styles.contentContainer
  }, /*#__PURE__*/React.createElement(TouchableOpacity, {
    style: styles.closeStyle,
    onPress: closeOnPress
  }, /*#__PURE__*/React.createElement(Image, {
    style: styles.closeImage,
    source: require('../../asset/icon/IC_CLOSE.png'),
    resizeMode: "stretch"
  })), /*#__PURE__*/React.createElement(Text, {
    style: styles.titleStyle
  }, title || 'Thông báo'), children, /*#__PURE__*/React.createElement(View, {
    style: styles.buttonWarp
  }, /*#__PURE__*/React.createElement(TouchableOpacity, {
    style: styles.closeButton,
    onPress: closeOnPress,
    disabled: closeDisable
  }, /*#__PURE__*/React.createElement(Text, {
    style: styles.closeText
  }, closeLabel || 'Đóng')), /*#__PURE__*/React.createElement(TouchableOpacity, {
    style: confirmDisable ? [styles.confirmButton, {
      backgroundColor: '#9099A0'
    }] : styles.confirmButton,
    onPress: confirmOnPress,
    disabled: confirmDisable
  }, /*#__PURE__*/React.createElement(Text, {
    style: styles.confirmText
  }, confirmLabel || 'Xác nhận'))))));
};
export default DialogueConfirm;
//# sourceMappingURL=DialogueConfirm.js.map