import { Modal } from 'antd' import { useState } from 'react' import { useTranslation } from 'react-i18next' import { NutstorePathSelector } from '../NutstorePathSelector' import { TopView } from '../TopView' interface Props { fs: Nutstore.Fs resolve: (data: string | null) => void } const PopupContainer: React.FC = ({ resolve, fs }) => { const [open, setOpen] = useState(true) const { t } = useTranslation() const onCancel = () => { setOpen(false) } const onClose = () => { resolve(null) } return ( ) } const TopViewKey = 'NutstorePathPopup' export default class NutstorePathPopup { static topviewId = 0 static hide() { TopView.hide(TopViewKey) } static show(fs: Nutstore.Fs) { return new Promise((resolve) => { TopView.show( { resolve(v) TopView.hide(TopViewKey) }} />, TopViewKey ) }) } }