text: /**
   * Determines how long it takes to prepare a certain juice.
   *
   * @param {string} name
   * @returns {number} time in minutes
   */
  export function timeToMixJuice(name) {
    switch(name) {
      case 'Pure Strawberry Joy': return 0.5;
      case 'Energizer': return 1.5;
      case 'Green Garden': return 1.5;
      case 'Tropical Island': return 3;
      case 'All or Nothing': return 5;
      default: return 2.5;
    };
  }
  /**
   * Calculates the number of limes that need to be cut
   * to reach a certain supply.
   *
   * @param {number} wedgesNeeded
   * @param {string[]} limes
   * @returns {number} number of limes cut
   */
  export function limesToCut(wedgesNeeded, limes) {
    let currentCount = 0;
    let i = 0;
    while(currentCount < wedgesNeeded && i < limes.length) {
      const lime = limes[i];
      switch(lime) {
        case 'small': {
          currentCount += 6;
          break;
        }
        case 'medium': {
          currentCount += 8;
          break;
        }
        case 'large': {
          currentCount += 10;
          break;
        }
      }
      i++;
    }
    return i;
  }
  /**
   * Determines which juices still need to be prepared after the end of the shift.
   *
   * @param {number} timeLeft
   * @param {string[]} orders
   * @returns {string[]} remaining orders after the time is up
   */
  export function remainingOrders(timeLeft, orders) {
    let prepareTime = 0;
    while(prepareTime < timeLeft && orders.length > 0) {
      prepareTime += timeToMixJuice(orders.shift());
    }
    return orders;
  }
  