import styles from "./styles.module.css";

interface IFullScreenModalProps {
  className?: string;
  classNameContent?: string;
  style?: React.CSSProperties;
  children: JSX.Element;
  isOpen: boolean;
}

function FullScreenModal({
  className = "",
  classNameContent = "",
  children,
  style,
  isOpen,
}: IFullScreenModalProps): JSX.Element {
  return (
    <div
      style={{ ...style }}
      className={`${styles["modal"]} ${className} ${isOpen ? styles.open : ""}`}
    >
      <div className={`${styles["modal__content"]} ${classNameContent}`}>
        {children}
      </div>
    </div>
  );
}

export default FullScreenModal;
