import React from 'react';
import { makeStyles } from '../../shared/makeStyles';
const rollTypeToColor = ({ rollTypeAdvantageColor, rollTypeCheckColor, rollTypeDamageColor, rollTypeDisadvantageColor, rollTypeRollColor, rollTypeSaveColor, rollTypeToHitColor, }, { roll }) => ({
    roll: rollTypeRollColor,
    'to hit': rollTypeToHitColor,
    damage: rollTypeDamageColor,
    check: rollTypeCheckColor,
    spell: rollTypeCheckColor,
    save: rollTypeSaveColor,
    heal: rollTypeSaveColor,
    advantage: rollTypeAdvantageColor,
    disadvantage: rollTypeDisadvantageColor,
}[roll.rollType]);
const useStyles = makeStyles()(({ gameLog: { rollTypeAdvantageColor, rollTypeCheckColor, rollTypeDamageColor, rollTypeDisadvantageColor, rollTypeRollColor, rollTypeSaveColor, rollTypeToHitColor, }, }, { roll }) => ({
    RollAction: {
        whiteSpace: 'nowrap',
        maxWidth: '200px',
        textOverflow: 'ellipsis',
        overflow: 'hidden',
        color: rollTypeToColor({
            rollTypeAdvantageColor,
            rollTypeCheckColor,
            rollTypeDamageColor,
            rollTypeDisadvantageColor,
            rollTypeRollColor,
            rollTypeSaveColor,
            rollTypeToHitColor,
        }, { roll }),
    },
}));
export const GameLogNotificationMessage = (props) => {
    const { message, roll } = props;
    const { classes, cx } = useStyles({ roll });
    return (React.createElement("span", { title: message.data.action, className: cx(classes.RollAction) },
        message.data.action,
        roll.rollType !== 'roll' ? ` ${roll.rollType}` : ''));
};
//# sourceMappingURL=GameLogNotificationMessage.js.map