import { DropDownOption } from "../../entity/dropDownOption";

export enum ADIcon {
    NONE = 'none',
    INFO = 'info',
    QUESTION = 'question',
    WARNING = 'warning',
    ERROR = 'error'
}
export enum ADButtons {
    None,
    OK,
    OKCancel,
    CancelOK,
    YesNo,
    YesNoCancel,
    NoYes,
}

export enum ADButtonColor {
    PRIMARY = 'primary',
    SUCCESS = 'success',
    INFO = 'info',
    WARNING = 'warning',
    DANGER = 'danger',
}
export declare type ADInputFiledType = null | 'string' | 'password' | 'number' | 'dropdown';


export class MessageBoxConfig {
    title: string = '';
    text: string = '';
    inputTooltip: string = '';
    dropDownOptions: DropDownOption[] = [];
    cardWidthClass: string = 'g-max-width-600';
    cardHeightClass: string = 'g-max-height-90vh';
    /**
     * Displayed Icon, Defaults to ADIcon.NONE, available types:
     * NONE, INFO, QUESTION, WARNING, ERROR
     */
    icon: ADIcon;

    /**
     * Buttons, Defaults to ADButtons.OK, available types:
     * OK, OKCancel, YesNo, YesNoCancel
     */
    buttons: ADButtons;

    /**
     * Confirm button color, Defaults to ADButtonColor.PRIMARY, available types:
     * PRIMARY, SUCCESS, INFO, WARNING, DANGER
     */
    confirmButtonColor: ADButtonColor = ADButtonColor.PRIMARY;

    /**
     * Cancel button color, Defaults to ADButtonColor.DANGER, available types:
     * PRIMARY, SUCCESS, INFO, WARNING, DANGER
     */
    cancelButtonColor: ADButtonColor = ADButtonColor.DANGER;

    /**
     * Close button color, Defaults to ADButtonColor.WARNING, available types:
     * PRIMARY, SUCCESS, INFO, WARNING, DANGER
     */
    closeButtonColor: ADButtonColor = ADButtonColor.WARNING;
    confirmButtonText: string = '';
    cancelButtonText: string = '';
    closeButtonText: string = '';
    showCloseButton: boolean = true;
    showConfirmButton: boolean = false;
    showCancelButton: boolean = false;

    confirmButtonFocus: boolean = false;
    cancelButtonFocus: boolean = false;
    closeButtonFocus: boolean = false;
    /**
     * Input box type, Defaults to null, available types:
     * string, password, number
     */
    inputType?: ADInputFiledType = null;

    /**
     * Input box initial value
     */
    inputValue: string;

    /**
     * Input box input field mask
     */
    inputMask: string = '';
    constructor(config: Partial<MessageBoxConfig>) {
        Object.assign(this, config);
    }
}