"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _styledModalComponents = require("../../styledModalComponents");
var _ModalHeaderComponent = _interopRequireDefault(require("../../ModalHeaderComponent"));
var _reactRedux = require("react-redux");
var _native = _interopRequireDefault(require("styled-components/native"));
var _icons = require("../../../../assets/icons");
var _SharedStyledComponents = require("../SharedStyledComponents");
var _reactNative = require("react-native");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const InfoPanel = _native.default.View`
  background-color: "#F3F6FC";
  display: flex;
  gap: 8px;
  border-radius: 8px;
  padding: 8px;
`;
const ManageDataModal = ({
  handleCloseModal
}) => {
  const {
    config
  } = (0, _reactRedux.useSelector)(state => state.chatSettingStore);
  const handleDownloadClick = async () => {
    // const exportedData = await getExportMyData();
    // const binaryData = exportedData.data;
    // console.log(binaryData);
    // const blob = new Blob([binaryData], { type: "text/plain" });
    // const url = URL.createObjectURL(blob);
    // const a = document.createElement("a");
    // a.href = url;
    // a.download = "mydata.json";
    // document.body.appendChild(a);
    // a.click();
    // document.body.removeChild(a);
    // URL.revokeObjectURL(url);
  };
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styledModalComponents.ModalContainerFullScreen, {
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ModalHeaderComponent.default, {
      handleCloseModal: handleCloseModal,
      headerTitle: 'Manage Data'
    }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_SharedStyledComponents.SharedSettingsCenterContainer, {
      children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_SharedStyledComponents.SharedSettingsColumnContainer, {
        children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_SharedStyledComponents.SharedSettingsSectionContainer, {
          children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SharedStyledComponents.SharedSettingsStyledLabel, {
            children: "Download your data"
          }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledModalComponents.LabelData, {
            style: {
              fontSize: 12,
              textAlign: 'left'
            },
            children: "You own your data. Tap the button below to download a copy of your data"
          })]
        }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SharedStyledComponents.SharedSettingsStyledButton, {
          borderColor: config?.colors?.primary || '#0052CD',
          onPress: handleDownloadClick,
          text: "Download your data",
          color: config?.colors?.primary || '#0052CD'
        })]
      }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_SharedStyledComponents.SharedSettingsColumnContainer, {
        children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_SharedStyledComponents.SharedSettingsSectionContainer, {
          children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SharedStyledComponents.SharedSettingsStyledLabel, {
            children: "Download your data"
          }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SharedStyledComponents.SharedSettingsLabelData, {
            children: "Use this only if you want to permanently delete your account & data from our system."
          })]
        }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_SharedStyledComponents.SharedSettingsInfoPanel, {
          bgColor: config?.colors?.secondary || '#F3F6FC',
          children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
            children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.InfoIcon, {
              color: config?.colors?.primary || '#0052CD'
            })
          }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SharedStyledComponents.SharedSettingsInfoText, {
            children: "Due to the immutable nature of distributed ledger technology, network nodes operated by the community may still retain historical transactions generated by your account, however your personally identifiable information such as your name, e-mail, your key-value storage etc will be removed. Any of your digital assets will be lost."
          })]
        }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SharedStyledComponents.SharedSettingsStyledButton, {
          borderColor: "#E53935",
          text: "Delete My Account",
          color: "#E53935"
        })]
      })]
    })]
  });
};
var _default = exports.default = ManageDataModal;
//# sourceMappingURL=ManageDataModal.js.map