import type { FC, PropsWithChildren, ReactElement } from "react";
import { useContext } from "react";
import type { TModalContext } from "../config/types";
import { ModalContext } from "../context";

/**
 * Шапка модального окна
 * @returns {ReactElement}
 */
export const ModalHeader: FC<PropsWithChildren> = ({ children }): ReactElement => {

  const { getCN } = useContext<TModalContext>(ModalContext);

  return (
    <header className={getCN("header")}>
      {children}
    </header>
  );

};
