import type { Metadata } from "next" import type { JSX } from "react" import { getTranslations } from "next-intl/server" import { requirePermission } from "@/shared/lib/auth-guard" import { Permissions } from "@/shared/types/permissions" import { getRecipients } from "@/modules/messaging/data-access" import { MessageCompose } from "@/modules/messaging/components/message-compose" export const dynamic = "force-dynamic" export async function generateMetadata(): Promise { const t = await getTranslations("messages") return { title: t("title.compose"), description: t("description.compose"), } } export default async function ComposeMessagePage({ searchParams, }: { searchParams: Promise<{ parentId?: string; receiverId?: string; subject?: string }> }): Promise { const ctx = await requirePermission(Permissions.MESSAGE_SEND) const sp = await searchParams const t = await getTranslations("messages") const recipients = await getRecipients(ctx.userId, ctx.dataScope) return (

{t("title.compose")}

{t("description.compose")}

) }