"use strict";

import React from 'react';
import { LabelData, ModalContainerFullScreen } from '../../styledModalComponents';
import ModalHeaderComponent from '../../ModalHeaderComponent';
import { useSelector } from 'react-redux';
import styled from 'styled-components/native';
import { InfoIcon } from '../../../../assets/icons';
import { SharedSettingsCenterContainer, SharedSettingsColumnContainer, SharedSettingsInfoPanel, SharedSettingsInfoText, SharedSettingsLabelData, SharedSettingsSectionContainer, SharedSettingsStyledButton, SharedSettingsStyledLabel } from '../SharedStyledComponents';
import { View } from 'react-native';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
const InfoPanel = styled.View`
  background-color: "#F3F6FC";
  display: flex;
  gap: 8px;
  border-radius: 8px;
  padding: 8px;
`;
const ManageDataModal = ({
  handleCloseModal
}) => {
  const {
    config
  } = 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__*/_jsxs(ModalContainerFullScreen, {
    children: [/*#__PURE__*/_jsx(ModalHeaderComponent, {
      handleCloseModal: handleCloseModal,
      headerTitle: 'Manage Data'
    }), /*#__PURE__*/_jsxs(SharedSettingsCenterContainer, {
      children: [/*#__PURE__*/_jsxs(SharedSettingsColumnContainer, {
        children: [/*#__PURE__*/_jsxs(SharedSettingsSectionContainer, {
          children: [/*#__PURE__*/_jsx(SharedSettingsStyledLabel, {
            children: "Download your data"
          }), /*#__PURE__*/_jsx(LabelData, {
            style: {
              fontSize: 12,
              textAlign: 'left'
            },
            children: "You own your data. Tap the button below to download a copy of your data"
          })]
        }), /*#__PURE__*/_jsx(SharedSettingsStyledButton, {
          borderColor: config?.colors?.primary || '#0052CD',
          onPress: handleDownloadClick,
          text: "Download your data",
          color: config?.colors?.primary || '#0052CD'
        })]
      }), /*#__PURE__*/_jsxs(SharedSettingsColumnContainer, {
        children: [/*#__PURE__*/_jsxs(SharedSettingsSectionContainer, {
          children: [/*#__PURE__*/_jsx(SharedSettingsStyledLabel, {
            children: "Download your data"
          }), /*#__PURE__*/_jsx(SharedSettingsLabelData, {
            children: "Use this only if you want to permanently delete your account & data from our system."
          })]
        }), /*#__PURE__*/_jsxs(SharedSettingsInfoPanel, {
          bgColor: config?.colors?.secondary || '#F3F6FC',
          children: [/*#__PURE__*/_jsx(View, {
            children: /*#__PURE__*/_jsx(InfoIcon, {
              color: config?.colors?.primary || '#0052CD'
            })
          }), /*#__PURE__*/_jsx(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__*/_jsx(SharedSettingsStyledButton, {
          borderColor: "#E53935",
          text: "Delete My Account",
          color: "#E53935"
        })]
      })]
    })]
  });
};
export default ManageDataModal;
//# sourceMappingURL=ManageDataModal.js.map