import { Button, Modal, ModalBody, ModalTitle, SelectBox, Spinner } from "@vertesia/ui/core"; import { useState } from "react"; import { useUITranslation } from '../../../i18n/index.js'; export enum ExportTypes { CSV = "CSV", JSON = "JSON" }; interface ExportPropertiesModalProps { isExporting: boolean; isOpen: boolean; onClose: (exportType?: string | null | undefined, exportAll?: boolean) => void; } export function ExportPropertiesModal({ isExporting, isOpen, onClose }: ExportPropertiesModalProps) { const title = "Export Object Properties"; return ( onClose(undefined)} isOpen={isOpen}> {title} {!isExporting && } {isExporting && } ) } interface SelectPanelProps { onClose: (exportType?: string | null, exportAll?: boolean) => void; } function SelectPanel({ onClose }: SelectPanelProps) { const { t } = useUITranslation(); const [exportType, setExportType] = useState(undefined); const [exportAll, setExportAll] = useState(undefined); const selectionOption: string[] = ["Export selected objects", "Export all objects"]; const exportAllBoolean = (option: string | undefined) => { return option == selectionOption[1]; } const onSubmit = () => { onClose(exportType, exportAllBoolean(exportAll)); } return (
) } interface WaitingPanelProps { } function WaitingPanel({ }: WaitingPanelProps) { const { t } = useUITranslation(); return (

{t('store.exportInProgress')}

{t('store.pleaseWait')}

) }