import UIHelper from '../../UIHelper';
export const getAlertButtonStyle = (alerts) => {
    const messageType = UIHelper.getMessageTypeFromAdaptableAlerts(alerts);
    const messageTypeColor = UIHelper.getColorByMessageType(messageType);
    const buttonBackground = UIHelper.getButtonColourForAdaptableAlerts(alerts, messageTypeColor);
    const buttonTextColor = UIHelper.getButtonTextColourForArrayandMessageType(alerts, messageType);
    let cssClasses = '';
    if (alerts?.length) {
        const cssMessageType = UIHelper.getCSSColorByMessageType(messageType);
        cssClasses = cssMessageType
            ? `twa:bg-${cssMessageType} twa:text-text-on-${cssMessageType}`
            : '';
    }
    return {
        color: buttonTextColor,
        background: buttonBackground,
        cssClasses,
    };
};
