import AwERoll from "./roll.mjs"

export default class AwEChatMessage extends ChatMessage {
  /** @override */
  async _renderRollContent(messageData) {
    if (this.rolls[0] instanceof AwERoll) {
      const isPrivate = !this.isContentVisible
      const rollHTML  = await this._renderRollHTML(isPrivate)
      messageData.message.content = rollHTML
      return
    }
    return super._renderRollContent(messageData)
  }
}
