"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var ui_exports = {};
__export(ui_exports, {
  bold: () => bold,
  dim: () => dim,
  green: () => green,
  label: () => label,
  renderTable: () => renderTable,
  reset: () => reset,
  section: () => section,
  value: () => value,
  violet: () => violet
});
module.exports = __toCommonJS(ui_exports);
const violet = "\x1B[38;5;99m";
const bold = "\x1B[1m";
const dim = "\x1B[2m";
const green = "\x1B[38;5;114m";
const reset = "\x1B[0m";
function label(text) {
  return `${dim}${text}${reset}`;
}
function value(text) {
  return `${violet}${bold}${text}${reset}`;
}
function section(text) {
  return `${violet}${bold}${text}${reset}`;
}
function renderTable(entries, indent = "  ") {
  if (entries.length === 0) return "";
  const colW = Math.max(...entries.map(([k]) => k.length));
  const top = `${indent}${violet}\u250C${"\u2500".repeat(colW + 2)}\u252C${"\u2500".repeat(18)}\u2510${reset}`;
  const bottom = `${indent}${violet}\u2514${"\u2500".repeat(colW + 2)}\u2534${"\u2500".repeat(18)}\u2518${reset}`;
  const rows = entries.map(([k, v], i) => {
    const sep = i < entries.length - 1 ? `
${indent}${violet}\u251C${"\u2500".repeat(colW + 2)}\u253C${"\u2500".repeat(18)}\u2524${reset}` : "";
    const pad = " ".repeat(colW - k.length);
    return `${indent}${violet}\u2502${reset} ${dim}${k}${reset}${pad} ${violet}\u2502${reset} ${violet}${bold}${v}${reset}${" ".repeat(Math.max(0, 16 - v.length))} ${violet}\u2502${reset}${sep}`;
  });
  return [top, ...rows, bottom].join("\n");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  bold,
  dim,
  green,
  label,
  renderTable,
  reset,
  section,
  value,
  violet
});
//# sourceMappingURL=ui.js.map
