import { Attachment, AttachmentType } from "@/app/providers/ProtocolProvider/protocol/packets/packet.message"; import { AttachImage } from "./AttachImage"; import { AttachMessages } from "./AttachMessages"; import { AttachFile } from "./AttachFile"; import { AttachAvatar } from "./AttachAvatar"; export interface DialogAttachmentProps { attach: Attachment; onRemove?: (attach: Attachment) => void; } export function DialogAttachment(props : DialogAttachmentProps) { return ( <> {props.attach.type == AttachmentType.IMAGE && } {props.attach.type == AttachmentType.MESSAGES && } {props.attach.type == AttachmentType.FILE && } {props.attach.type == AttachmentType.AVATAR && } ) }