import { Modal, Space, Typography } from '@arco-design/web-react'

const { Text, Title } = Typography

export function WorkbenchItemPreview({ title, onClose }: { title: string | null; onClose: () => void }) {
  return (
    <Modal
      className="item-preview-modal"
      title="只读预览"
      visible={Boolean(title)}
      footer={null}
      onCancel={onClose}
    >
      <Space direction="vertical" size={12}>
        <Title heading={5}>{title}</Title>
        <Text type="secondary">当前仅提供只读摘要；请从所属频道执行编辑或管理操作。</Text>
      </Space>
    </Modal>
  )
}
