import { useState } from 'react' import { Button, Divider, Input, Popover, Space, Tag, Typography } from 'antd' import { CheckOutlined, CloseCircleOutlined, DeleteOutlined, EditOutlined, ExclamationCircleOutlined, StopOutlined, } from '@ant-design/icons' import type { RockTokenItem } from '../../api' const { Text } = Typography export interface TokenRemarkCellProps { record: RockTokenItem onUpdateRemark: (id: number, remark: string, status?: string) => void onMarkAbnormal: (id: number, remark?: string) => void } export function TokenRemarkCell({ record, onUpdateRemark, onMarkAbnormal }: TokenRemarkCellProps) { const [open, setOpen] = useState(false) const [inputValue, setInputValue] = useState(record.remark || '') const handleQuickMarkAbnormal = (reason: string) => { onMarkAbnormal(record.id, reason) setOpen(false) } const handleQuickUpdate = (remarkText: string) => { onUpdateRemark(record.id, remarkText) setOpen(false) } const handleSaveCustom = () => { onUpdateRemark(record.id, inputValue.trim()) setOpen(false) } const handleClear = () => { onUpdateRemark(record.id, '') setInputValue('') setOpen(false) } const content = (