ort-report-row-description-error-missing-field",
    isError: true,
  },
};

export default class ImportDetailsRow extends HTMLElement {
  constructor(number, reportRow) {
    super();
    this._login = reportRow;

    let rowElement = document
      .querySelector("#import-details-row-template")
      .content.cloneNode(true);

    const uiData = resultToUiData[reportRow.result];
    if (uiData.isError) {
      this.classList.add("error");
    }
    const rowCount = rowElement.querySelector(".row-count");
    const rowDetails = rowElement.querySelector(".row-details");
    while (rowElement.childNodes.length) {
      this.appendChild(rowElement.childNodes[0]);
    }
    document.l10n.connectRoot(this);
    document.l10n.setAttributes(
      rowCount,
      "about-logins-import-report-row-index",
      {
        number,
      }
    );
    document.l10n.setAttributes(rowDetails, uiData.message, {
      field: reportRow.field_name,
    });
  }
}
customElements.define("import-details-row", ImportDetailsRow);
PK