/**
 * Flowtype definitions for Alert
 * Generated by Flowgen from a Typescript Definition
 * Flowgen v1.21.0
 * @flow
 */

import React, { PropsWithChildren } from "react";
declare export * from "./AlertProvider";

declare export var AlertTypes: {|
  +RELATIVE: "relative", // "relative"
  +TOAST: "toast", // "toast"
  +BANNER: "banner", // "banner"
|};

declare export var AlertVariant: {|
  +CRITICAL: "critical", // "critical"
  +INFORMATIVE: "informative", // "informative"
  +SUCCESS: "success", // "success"
  +WARNING: "warning", // "warning"
|};
export type BaseAlertProps = PropsWithChildren<{
  /**
   * The title of the component.
   */
  title?: string,

  /**
   * The variant to use. Defaults to 'success'.
   * @defaultValue 'success'
   */
  variant?: $Values<typeof AlertVariant>,

  /**
   * The variant to use. Defaults to 'relative'.
   * @defaultValue 'relative'
   */
  type?: $Values<typeof AlertTypes>,

  /**
   * Show / Hide close button. Defaults to true.
   * @defaultValue true
   */
  showCloseButton?: boolean,

  /**
   * Close button title. Defaults to 'Close'.
   * @defaultValue 'Close'
   */
  closeButtonTitle?: string,

  /**
   * Show / Hide Alert. Defaults to true.
   * @defaultValue true
   */
  isOpen?: boolean,

  /**
   * Show alert delay (in milliseconds). Defaults to 6000.
   * @defaultValue 6000
   */
  delay?: number,

  /**
   * Stack index. Defaults to 0.
   * @defaultValue 0
   */
  stackIndex?: number,
  ...
}>;
declare type TypeProps =
  | {
      type: typeof AlertTypes.TOAST,
      delay?: number,
      showCloseButton: boolean,
      onClose: () => void,
      ...
    }
  | {
      type: typeof AlertTypes.RELATIVE | typeof AlertTypes.BANNER,
      showCloseButton: boolean,
      onClose?: () => void,
      ...
    }
  | {
      type?: typeof AlertTypes.RELATIVE | typeof AlertTypes.BANNER,
      onClose?: () => void,
      ...
    };
export type AlertProps = {
  ...BaseAlertProps,
  ...TypeProps,
  ...React.HTMLAttributes<HTMLElement>,
};
declare export default function Alert(
  x: AlertProps
): React.ReactElement<AlertProps> | null;
