import { BaseComponent, publicDirURL } from "./chunk-PE3GG3TN.js"; // src/templates/error_metadata/main.ts import { dump, themes } from "@poppinss/dumper/html"; var ErrorMetadata = class extends BaseComponent { cssFile = new URL("./error_metadata/style.css", publicDirURL); #primitives = ["string", "boolean", "number", "undefined"]; /** * Formats the error row value */ #formatRowValue(value, dumpValue, cspNonce) { if (dumpValue === true) { return dump(value, { styles: themes.cssVariables, cspNonce }); } if (this.#primitives.includes(typeof value) || value === null) { return value; } return dump(value, { styles: themes.cssVariables, cspNonce }); } /** * Returns HTML fragment with HTML table containing rows * metadata section rows */ #renderRows(rows, cspNonce) { return `
| ${row.key} | ${this.#formatRowValue(row.value, row.dump, cspNonce)} |