export class Output {

  // Channels used to indicate the nature of the output for formatting purposes(raw HTML only)
  static get USER () {
    return 0;
  }

  static get INFO () {
    return 1;
  }

  static get ERR () {
    return 2;
  }

  static get INPUT () {
    return 3;
  }
  // </ END Channels>

  /**
   * sendOutput is the function used by the code processor to send output from the program to the user
   * From the functions presented in this file this is only function that MUST BE provided by the instance passed to
   * the processor using IVProgProcessor.registerOutput
   * 
   * @param {string|number|boolean} text text to be present as an output 
   */
  sendOutput (text) {
    throw new Error("Must be implemented");
  }

  /**
   * Function used by the assessment tool to present the assessment results which can be raw HTML text and should not be sanitized
   * @param {string|number|boolean} text text to be presented to the user
   * @param {number} channel channel that should be used to send this output
   */
  writeRawHTML (text, channel) {
    throw new Error("Must be implemented");
  }

  /**
   * Function used by the assessment tool to generate logs and notifications
   * @param {string|number|boolean} text the output
   * @param {boolean} newLine if true a line break will be added after the text
   */
  write (text, newLine = false) {
    throw new Error("Must be implemented");
  }

  /**
   * Function used by the assessment tool to generate logs and notifications in the INFO channel
   * @param {string|number|boolean} text the output
   */
  info (text) {
    throw new Error("Must be implemented");
  }

  /**
   * Function used by the assessment tool to generate logs and notifications in the ERROR channel
   * @param {string|number|boolean} text the output
   */
  err (text) {
    throw new Error("Must be implemented");
  }

}