import * as React from "react";
import Modal = require('react-bootstrap/lib/Modal');
import {Omit} from "../../typings/common";

type PopupProps = {
    children: React.ReactNode;
    stackable?: boolean;
    borderedTitle?: boolean;
    noPadding?: boolean;
    noBottomPadding?: boolean;
    noHeaderPadding?: boolean;
    closeButton?: boolean;
    closeLabel?: string;
    title?: string,
    testAutomationId?: string,
    header?: React.ReactNode,
    footer?: React.ReactNode,
    onClose?: Function;
} & Omit<Modal.ModalProps, "onHide"> & Partial<PopupDefaultProps>

type PopupDefaultProps = {
    // children: null, // exclude from default to make children required
    stackable: boolean;
    borderedTitle: boolean;
    noPadding: boolean;
    noBottomPadding: boolean;
    noHeaderPadding: boolean;
    closeButton: boolean;
    closeLabel: string;
    title: string;
    testAutomationId: string;
    // header: null;
    // footer: null;
    // onClose: null;
}

declare class Popup extends React.Component<PopupProps> {
    static stack: Popup[];
    static defaultProps: PopupDefaultProps;

    static close(): void;
    static addStyleSheet(): void;
    static updateBodyClass(): void;
    hideModal(): void;
}