#include <iostream>
#include <sstream>
#include "Errorseal.h"
#include "translator.h"

/*
 * Coder: TheSkyWinds
 * Translator: MewTheNekomata
 *
 * Created: 12/16/24.
 */

// Mew's translations:
// A=; B=x C=* D=x E=& F=( G=x H=) I=[ J=x K=x L=| M=x N=/ O=? P=+ Q=x R=] S={ T=} U=. V=x W=- X=x Y=x Z=x

// Sky's translations:
// A=; B=@ C=* D=< E=& F=( G=" H=) I=[ J=x K=x L=| M=x N=/ O=? P=+ Q=x R=] S={ T=} U=. V=x W=- X=x Y=x Z=x

std::string usrInput() {

    std::string input{};

    // Ensures that whitespace is preserved.
    std::cout << "Enter the untranslated text: ";
    std::getline(std::cin, input);

    // Checks if there's any error & clears the buffer.
    error::cinErrorVerbose();

    return input;
}



int main() {
    std::string untranslatedText{};

    while (true) {
        untranslatedText = {usrInput()};

        if (untranslatedText == "exit") {
            break;
        }

        std::cout << "Translation: " << translation::translateInput(untranslatedText) << std::endl;
    }
}