import { Popup, PopupPropsType } from "@/components/Popup"; import React, { useState } from "react"; import ExportMnemonicPhrase from "./ExportMnemonicPhrase"; import SettingPanel, { SettingPanelProps } from "./SettingPanel"; type SettingPopupProps = Omit & Omit; const SETTING_PANEL_HEIGHT = "346px"; const SETTING_EXPORT_PHRASE_HEIGHT = "528px"; const SettingPopup: React.FC = ({ onChangePayPin, onClose, ...popupProps }) => { const [showExport, setShowExport] = useState(false); const [height, setHeight] = useState(SETTING_PANEL_HEIGHT); const title = showExport ? "Export Mnemonic Phrase" : "Setting"; const openExportPhrase = () => { setHeight(SETTING_EXPORT_PHRASE_HEIGHT); setShowExport(true); }; const handleClose = () => { if (showExport) { setShowExport(false); setHeight(SETTING_PANEL_HEIGHT); } else { onClose?.(); } }; return ( document.body} onBack={handleClose} onClose={handleClose} bodyClassName="sm:uikit-max-w-[375px]" bodyStyle={{ height, }} > {showExport ? ( ) : ( )} ); }; export default SettingPopup;