"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.makeWidenRight = exports.widenRight = exports.styledText = exports.chalked = void 0; const chalk = require("chalk"); function chalked(style) { if (!style) return (...text) => text.join(' '); let clr = chalk.reset; if (style.color) { if (style.color.startsWith('#')) clr = clr.hex(style.color); else clr = clr.keyword(style.color); } if (style.backgroundColor) { if (style.backgroundColor.startsWith('#')) clr = clr.bgHex(style.backgroundColor); else clr = clr.bgKeyword(style.backgroundColor); } return clr; } exports.chalked = chalked; const styledText = (style, text) => chalked(style)(text); exports.styledText = styledText; const widenRight = (text, width) => text + ' '.repeat(width - text.length); exports.widenRight = widenRight; const makeWidenRight = (width) => (text) => text + ' '.repeat(width - text.length); exports.makeWidenRight = makeWidenRight;