import command from "../../config.json" assert { type: "json" };

const createBanner = (): string[] => {
  const banner: string[] = [];
  banner.push("<br>");
  command.ascii.forEach((ele) => {
    let bannerString = "";
    for (let i = 0; i < ele.length; i++) {
      if (ele[i] === " ") {
        bannerString += "&nbsp;";
      } else {
        bannerString += ele[i];
      }
    }

    let eleToPush = `<pre>${bannerString}</pre>`;
    banner.push(eleToPush);
  });
  banner.push("<br>");
  banner.push("Welcome to Joshua UwU <3");
  banner.push(
    "Type <span class='command'>'help'</span> for a list of all available commands."
  );
  banner.push("<br>");
  return banner;
};

export const BANNER = createBanner();
