import { visibleWidth } from "@singularity-forge/pi-tui";

export function rightAlign(left: string, right: string, width: number): string {
	const leftVis = visibleWidth(left);
	const rightVis = visibleWidth(right);
	const gap = Math.max(1, width - leftVis - rightVis);
	return left + " ".repeat(gap) + right;
}
