"use client";

import { AccountStrike, Message } from "revolt-api";
import { ListCompactor } from "../common/ListCompactor";
import { CompactMessage } from "../cards/CompactMessage";

export function RelevantModerationNotices({
  strikes,
  notices,
}: {
  strikes: AccountStrike[];
  notices: Message[];
}) {
  return (
    <div className="flex gap-2">
      <div className="flex-1 min-w-0 flex flex-col gap-2">
        <h2 className="text-md text-center pb-2">Strikes</h2>
        <ListCompactor data={strikes} Component={({ item }) => null} />
      </div>
      <div className="flex-1 min-w-0 flex flex-col gap-2">
        <h2 className="text-md text-center pb-2">Alerts</h2>
        <ListCompactor
          data={notices}
          Component={({ item }) => <CompactMessage message={item} hideUser />}
        />
      </div>
    </div>
  );
}
