${foundry.utils.escapeHTML( + message, + )}
`, + ) + .join(""); + + const capHtml = computed.capWarnings + .map( + (w) => + `${foundry.utils.escapeHTML( + game.i18n.format("DG.Profession.Dialog.CapWarning", { + skill: w.label, + attempted: w.attempted, + waste: w.waste, + }), + )}
`, + ) + .join(""); + + return validationHtml + capHtml; + } + + async #refreshUi() { + const root = this.#contentRoot(); + if (!root) return; + + const computed = this.#compute(); + + const rows = this.#buildSkillDisplayRows(computed); + + const body = root.querySelector("[data-profession-skills-body]"); + if (body) { + body.innerHTML = rows + .map((r) => { + const modifiedClass = r.isModified ? " is-modified" : ""; + return `