'use client' import React, { useState } from 'react' import { useTranslation } from 'react-i18next' import { RiCloseLine, RiLock2Line } from '@remixicon/react' import cn from '@/utils/classnames' import { Env } from '@/app/components/base/icons/src/vender/line/others' import Modal from '@/app/components/base/modal' import Checkbox from '@/app/components/base/checkbox' import Button from '@/app/components/base/button' import type { EnvironmentVariable } from '@/app/components/workflow/types' export type DSLExportConfirmModalProps = { envList: EnvironmentVariable[] onConfirm: (state: boolean) => void onClose: () => void } const DSLExportConfirmModal = ({ envList = [], onConfirm, onClose, }: DSLExportConfirmModalProps) => { const { t } = useTranslation() const [exportSecrets, setExportSecrets] = useState(false) const submit = () => { onConfirm(exportSecrets) onClose() } return ( { }} className={cn('max-w-[480px] w-[480px]')} >
{t('workflow.env.export.title')}
{envList.map((env, index) => ( ))}
NAME VALUE
{env.name}
Secret
{env.value}
setExportSecrets(!exportSecrets)} />
setExportSecrets(!exportSecrets)}>{t('workflow.env.export.checkbox')}
) } export default DSLExportConfirmModal