import { getAllMessageTypes } from "../../lib/message-types-registry.js";
import { messageTypeListResponseSchema } from "../openapi.js";
const metadata = {
  GET: { requireAuth: true, requireFeatures: ["messages.view"] }
};
async function GET() {
  const items = getAllMessageTypes().map((type) => ({
    type: type.type,
    module: type.module,
    labelKey: type.labelKey,
    icon: type.icon,
    color: type.color ?? null,
    allowReply: type.allowReply ?? true,
    allowForward: type.allowForward ?? true,
    actionsExpireAfterHours: type.actionsExpireAfterHours ?? null,
    ui: {
      listItemComponent: type.ui?.listItemComponent ?? null,
      contentComponent: type.ui?.contentComponent ?? null,
      actionsComponent: type.ui?.actionsComponent ?? null
    }
  }));
  return Response.json({ items });
}
const openApi = {
  tag: "Messages",
  methods: {
    GET: {
      summary: "List registered message types",
      responses: [
        { status: 200, description: "Message types", schema: messageTypeListResponseSchema }
      ]
    }
  }
};
export {
  GET,
  metadata,
  openApi
};
//# sourceMappingURL=route.js.map
