import { IconButton } from "../Button";
import { ButtonType } from "../Button/Button";
import { IconButtonProps } from "../Button/IconButton";

interface ExtendedIconButtonProps extends IconButtonProps {
  type?: ButtonType;
}

type ModalCloseButtonProps = Omit<ExtendedIconButtonProps, "iconName">;

const ModalCloseButton: React.FC<ModalCloseButtonProps> = (props) => (
  <IconButton
    iconName="delete"
    type="ghost"
    isSquare
    size="small"
    className="modal__close"
    data-a11y-dialog-hide
    aria-label="Zatvoriť"
    {...props}
  />
);

ModalCloseButton.displayName = "ModalCloseButton";

export { ModalCloseButton };
