"use client";

import React from "react";
import Modal from "@/components/elements/Modal";
import PostCommentsContent from "@/components/posts/PostCommentsContent";

type CommentsModalProps = {
  isOpen: boolean;
  onClose: () => void;
  userId: string;
  postId?: string;
};

export default function CommentsModal({
  isOpen,
  onClose,
  userId,
  postId,
}: CommentsModalProps) {
  return (
    <Modal isOpen={isOpen} onClose={onClose} height="min(82vh, 520px)">
      <PostCommentsContent
        userId={userId}
        postId={postId}
        variant="modal"
        onClose={onClose}
        className="h-full"
      />
    </Modal>
  );
}

// re-export types for backward compatibility
export type { PostComment as Comments, CommentUser as User } from "@/components/posts/PostCommentsContent";
