type Props = {
  title: string;
  body: string;
  onAcknowledge: () => Promise<void> | void;
};

export default function UpdateNoticeModal({ title, body, onAcknowledge }: Props) {
  return (
    <div className="fixed inset-0 z-[120] bg-black/50 backdrop-blur-sm flex items-center justify-center p-4">
      <div className="card max-w-lg w-full p-6">
        <h2 className="text-xl font-semibold mb-2">{title}</h2>
        <p className="muted whitespace-pre-wrap mb-6">{body}</p>
        <div className="flex justify-end">
          <button className="btn" onClick={() => void onAcknowledge()}>
            Got it
          </button>
        </div>
      </div>
    </div>
  );
}
