import { Divider, Popconfirm, Space, Tooltip, Typography } from "antd"; import { LikeOutlined, DeleteOutlined } from "@ant-design/icons"; import { useIntl } from "react-intl"; import type { ISentence } from "../SentEdit"; import PrAcceptButton from "./PrAcceptButton"; import InteractiveButton from "./InteractiveButton"; const { Paragraph } = Typography; interface IWidget { data: ISentence; isPr?: boolean; style?: React.CSSProperties; compact?: boolean; prOpen?: boolean; onAccept?: (value: ISentence) => void; onDelete?: () => void; } const SuggestionToolbarWidget = ({ data, isPr = false, onAccept, style, compact = false, onDelete, }: IWidget) => { const intl = useIntl(); return ( {isPr ? ( { if (typeof onAccept !== "undefined") { onAccept(value); } }} /> { if (typeof onDelete !== "undefined") { onDelete(); } }} okType="danger" okText={intl.formatMessage({ id: `buttons.delete`, })} cancelText={intl.formatMessage({ id: `buttons.no`, })} > ) : ( )} ); }; export default SuggestionToolbarWidget;