import React from 'react';
import { Button, Modal, Space } from '@douyinfe/semi-ui';
import { showError } from '../../../helpers';
const TokensActions = ({
selectedKeys,
setEditingToken,
setShowEdit,
batchCopyTokens,
batchDeleteTokens,
copyText,
t,
}) => {
// Handle copy selected tokens with options
const handleCopySelectedTokens = () => {
if (selectedKeys.length === 0) {
showError(t('请至少选择一个令牌!'));
return;
}
Modal.info({
title: t('复制令牌'),
icon: null,
content: t('请选择你的复制方式'),
footer: (
),
});
};
// Handle delete selected tokens with confirmation
const handleDeleteSelectedTokens = () => {
if (selectedKeys.length === 0) {
showError(t('请至少选择一个令牌!'));
return;
}
Modal.confirm({
title: t('批量删除令牌'),
content: (
{t('确定要删除所选的 {{count}} 个令牌吗?', { count: selectedKeys.length })}
),
onOk: () => batchDeleteTokens(),
});
};
return (
);
};
export default TokensActions;