import { ReactNode } from "react" import type { BaseComponentProps } from "@type/base.component" import type { ModalProps as AuiModalProps } from "@atomintl/aui-next" import type { BaseButtonProps } from "@components/Button/interface" export type ModalActionsButton = Partial< Pick > export interface BaseNtsModalProps { /** * 是否隐藏弹窗head * @default false * */ hideHead?: boolean /** * 是否隐藏弹窗actions * @default false * */ hideActions?: boolean /** * 设置取消按钮 * variant展现形式 * @default "outlined" * color颜色 * @default "gray" */ cancelConfig?: ModalActionsButton /** * 设置确认按钮 * variant展现形式 * @default "contained" * color颜色 * @default "primary" * size尺寸大小 * @default "medium" */ confirmConfig?: ModalActionsButton /** * 设置弹窗class */ classes?: { head?: string; content?: string; actions?: string } } export type ModalProps = BaseNtsModalProps & AuiModalProps export type ModalHeadProps = Pick export type ModalContentProps = Pick export type ModalActionsProps = Pick< ModalProps, "cancelText" | "okText" | "cancelConfig" | "confirmConfig" | "onCancel" | "onOk" | "className" | "style" | "children" > export type ModalConfimProps = Omit & { content: string | ReactNode }