import { IconType } from "@vitality-ds/icons/src/Icon/types"; import { ExcludedProps } from "@vitality-ds/system"; import React from "react"; import { ButtonProps } from "../Button/types"; import { valueof } from "../helpers/logic/type-helpers"; declare type AllowedVariantKeys = "custom" | "transactional" | "passive" | "warning" | "destructive" | "acknowledgement"; declare type VariantOptionType = { titleIcon: boolean; forcedIcon: React.FunctionComponent; actionsAllowed: boolean; primaryActionVariant: valueof>; primaryActionText: string | boolean; secondaryActionsAllowed: boolean; cancelActionAllowed: boolean; headerCloseAllowed: boolean; }; export declare type VariantOptionsType = { [K in AllowedVariantKeys]: VariantOptionType; }; export declare type DialogActionButtonType = Omit & { label: string; }; export declare type HeaderPropsType = { /** * The title of the dialog */ title: string; /** * The subtitle of the dialog, space provided will collapse if not provided */ subtitle?: string; /** * The icon shown to the left of the title. title and subtitle pushed against left padding if not provided. */ icon?: React.FunctionComponent; /** * The function run when the close button is pressed. By passing this function to this prop the close button is rendered, otherwise the button is not rendered. */ closeButtonOnClick?: () => unknown; }; export declare type ContentPropsType = { /** * renders either the ReactNode passed or renders the string inside a vitality Typography component. */ content: JSX.Element; }; export declare type ActionsPropsType = { /** * Allows the control of the Primary button's `onClick` function and `label` */ primaryButtonProps: DialogActionButtonType; /** * Allows the control of the Secondary button's `onClick` function and `label` */ secondaryButtonProps?: DialogActionButtonType; /** * Allows the control of the Tertiary button's `onClick` function and `label` */ tertiaryButtonProps?: DialogActionButtonType; /** * Allows the control of the Cancel button's `onClick` function and `label` */ cancelButtonProps?: DialogActionButtonType; }; export declare type VariantType = { /** * */ variant?: AllowedVariantKeys; }; export declare type DialogProps = ExcludedProps & ContentPropsType & VariantType & { /** * Controls the maximum width the dialog content can fill. * @default "md" */ width?: "sm" | "md" | "lg"; /** * Controls the props associated with the header: `title`, `subtitle`, `closeButtonOnClick`, and `icon` */ headerProps: HeaderPropsType; /** * Controls the props associated with the actions: `primaryButtonProps`, `secondaryButtonProps`, `tertiaryButtonProps`, and `cancelButtonProps` */ actionsProps?: ActionsPropsType; }; export {};