import React, { ReactNode, HTMLAttributes } from 'react';
import { ButtonProps } from '../button';
import { CSSValueWithLength, SpaceProps } from '../../styles';
import { ModalOverlayBaseProps, ModalBaseCancelReason } from './ModalOverlay';
import { ModalActionButtonType } from './ModalActionButton';
export type ModalButtonProps = Omit;
export type ModalCancelReason = ModalBaseCancelReason;
/**
* 콘텐츠 영역 커스터마이징
*
* - SpaceProps: margin, padding 등 여백 조정 가능
* - maxHeight: 최대 높이 지정 (미지정 시 안전여백 내 자동 계산)
* - scrollable: true 시 overflow-y: auto 적용
*/
export interface ModalContentProps extends SpaceProps, HTMLAttributes {
maxHeight?: CSSValueWithLength;
scrollable?: boolean;
}
type LayoutHeightType = {
header: number;
footer: number;
};
export interface ModalProps extends Omit {
title?: ReactNode;
confirmText?: string;
confirmButtonProps?: ModalButtonProps;
cancelText?: string;
cancelButtonProps?: ModalButtonProps;
/**
* autofocus 지정할 기본 버튼 요소
* @default null
*/
autoFocusButton?: ModalActionButtonType | null;
/**
* 헤더 영역 타이틀 좌측 backButton 사용 유무
* @default false
*/
backButton?: boolean;
/** @default true */
closeButton?: boolean;
/**
* 좁은 간격 사용 유무
* @default false
*/
dense?: boolean;
contentProps?: ModalContentProps;
/**
* - 기본 Header(title, backButton, closeButton)는 미노출됩니다.
*/
header?: ReactNode;
/**
* - 기본 Footer(confirmText, cancelText)는 미노출됩니다.
* - dense 속성이 적용되지 않습니다.
* - fullScreen 속성이 true일 경우 자동 해당 영역은 fixed 처리 됩니다.
*/
footer?: ReactNode;
/**
* 푸터 버튼 좌측 영역에 콘텐츠를 추가할 수 있습니다.
*/
footerExtra?: ReactNode;
/**
* 전체화면 사용 유무, 헤더/푸터 영역이 자동 고정됩니다.
* @default false
*/
fullScreen?: boolean;
onConfirm?: () => void;
/**
* reason을 포함한 cancel 이벤트를 전달합니다.
* - 'cancelClick' | 'escapeKeyPress' | 'overlayClick'
*/
onCancel?: (reason: ModalCancelReason) => void;
/**
* Modal Header backButton 클릭 이벤트
*/
onClickBackButton?: () => void;
}
export declare const MIN_WIDTH = 480;
export declare const Modal: React.ComponentType>;
export declare const ModalContent: import("@emotion/styled").StyledComponent<{
theme?: import("@emotion/react").Theme | undefined;
as?: React.ElementType | undefined;
} & ModalContentProps & {
fullScreen: boolean;
hasFooter: boolean;
layoutHeight: LayoutHeightType;
contentOverflow: boolean;
}, React.DetailedHTMLProps, HTMLDivElement>, {}>;
export {};