import { memo } from "react"; import type { Message, NativeStructurePreviewResult, NativeStructureRef } from "@fusion/core"; import { NativeStructurePreview } from "./NativeStructurePreview"; export interface MailboxNativeStructureEmbedsProps { message: Pick; projectId?: string; onOpen: (ref: NativeStructureRef, payload: NativeStructurePreviewResult) => void; } /** * FNXC:NativeStructureEmbed 2026-07-20-12:00: * Mail message metadata is the durable home for first-class structure embeds. This thin wrapper * deliberately owns no preview behavior: the shared lazy resolver handles live data and missing * targets, while this returns no shell for ordinary mail with no structural attachment. */ export const MailboxNativeStructureEmbeds = memo(function MailboxNativeStructureEmbeds({ message, projectId, onOpen, }: MailboxNativeStructureEmbedsProps) { const embeds = message.metadata?.nativeStructures; if (!embeds?.length) return null; return (
{embeds.map((embed, index) => ( ))}
); });