'use client' import { Button } from '@langgenius/dify-ui/button' import { Dialog, DialogClose, DialogContent, DialogDescription, DialogTitle, } from '@langgenius/dify-ui/dialog' import { IconButton } from '@langgenius/dify-ui/icon-button' import { InputGroup, InputGroupAddon, InputGroupInput } from '@langgenius/dify-ui/input-group' import { useTranslation } from 'react-i18next' import { CopyFeedback } from '@/app/components/base/copy-feedback' type CreatedApiKeyDialogProps = { open: boolean onOpenChange: (open: boolean) => void value: string } export function CreatedApiKeyDialog({ open, onOpenChange, value }: CreatedApiKeyDialogProps) { const { t } = useTranslation() return (
{t(($) => $['apiKeyModal.apiSecretKey'], { ns: 'appApi' })} {t(($) => $['apiKeyModal.generateTips'], { ns: 'appApi' })}
$['operation.close'], { ns: 'common' })} size="lg" className="absolute inset-e-6 top-6" > } />
$['apiKeyModal.secretKey'], { ns: 'appApi' })} autoComplete="off" className="font-mono" readOnly spellCheck={false} value={value} />
) }