"use client" /** * Phase 2b — SelfAuditFooter injection widget. * * Mounts into the submission drawer's `submission-drawer:footer` spot. Renders * the static informational note that opening this drawer is itself written to * the access-audit log (purpose: view). Purely informational — no I/O, no * mutation. Reuses the existing `forms.drawer.audit_note` i18n key. * * Feature-gated behind `forms.view` to match every other admin submission * surface. */ import * as React from 'react' import { ShieldCheck } from 'lucide-react' import type { InjectionWidgetModule } from '@open-mercato/shared/modules/widgets/injection' import { useT } from '@open-mercato/shared/lib/i18n/context' import type { FormsDrawerWidgetContext } from '../context' type SelfAuditFooterProps = { context: FormsDrawerWidgetContext } export function SelfAuditFooterWidget({ context }: SelfAuditFooterProps) { const t = useT() if (!context?.submissionId) return null return (
{t('forms.drawer.audit_note', { fallback: 'This view is being written to the access audit log — purpose: view.', })}
) } const widget: InjectionWidgetModule