import React from "react";
import { Dialog as KendoDialog } from "@progress/kendo-react-dialogs";
import { DialogProps } from "./DialogProps";

const Dialog: React.FC<DialogProps> = ({
  dataTestId,
  appendTo,
  autoFocus,
  className,
  closeIcon,
  contentStyle,
  dir,
  height,
  id,
  minWidth,
  style,
  themeColor,
  title,
  width,
  onClose,
  children,
}) => {
  return (
    <div data-test-id={dataTestId}>
      <KendoDialog
        appendTo={appendTo}
        autoFocus={autoFocus}
        className={className}
        closeIcon={closeIcon}
        contentStyle={contentStyle}
        dir={dir}
        height={height}
        id={id}
        minWidth={minWidth}
        style={style}
        themeColor={themeColor}
        title={title}
        width={width}
        onClose={onClose}
      >
        {children}
      </KendoDialog>
    </div>
  );
};

export default Dialog;
