import { ROLLDIALOG_SECTION, RollPart } from "./roll-part.mjs"

const OPPONENT = "opponent"

export class RollPartOpponent extends RollPart {

  get code() { return OPPONENT }
  get section() { return ROLLDIALOG_SECTION.ACTION }

  visible(rollData) { return rollData.type.opposed }
  title(rollData) { return rollData.opponent?.name ?? '' }
}
