import Button from "./Button";

function UserInfoModal(props: {
  isVisible: boolean;
  projectname: string;
  onClose: () => void;
}): JSX.Element {
  if (!props.isVisible) return <></>;

  return (
    <div
      className="fixed inset-0 bg-black bg-opacity-30 backdrop-blur-sm 
      flex justify-center items-center"
    >
      <div className="border-4 border-black bg-white p-2 rounded-lg text-center">
        <p className="font-bold text-[30px]">{props.projectname}</p>
        <div>
          <h2 className="font-bold text-[22px] mb-[20px]">
            Members of this project:
          </h2>
          <div className="pr-6 pl-6">{/*Show all members in project*/}</div>
        </div>
        <div className="items-center space-x-6 pr-6 pl-6">
          <Button
            text={"Delete"}
            onClick={function (): void {
              //DELETE PROJECT
            }}
            type="button"
          />
          <Button
            text={"Close"}
            onClick={function (): void {
              props.onClose();
            }}
            type="button"
          />
        </div>
      </div>
    </div>
  );
}

export default UserInfoModal;
