package com.google.sps.data;

import java.util.ArrayList;
import java.util.List;

// Class representing a Recipe
public class Recipe {
  private ArrayList<String> ingredients;
  private ArrayList<String> steps;
  private ArrayList<String> tags;
  private boolean published;
  private String authorID;
  private String description;
  private String imageBlobKey;
  private String name;
  private int popularity;
  private long id;

  // Recipe constructor for the recipe cards for which less information is needed
  public Recipe(long id, String name, String imageBlobKey, String description) {
    this.id = id;
    this.name = name;
    this.imageBlobKey = imageBlobKey;
    this.description = description;
    ingredients = new ArrayList<String>();
    steps = new ArrayList<String>();
    tags = new ArrayList<String>();
    popularity = 0;
    published = false;
  }
  
  public Recipe(long id, String name, String imageBlobKey, String description, ArrayList<String> tags, 
      ArrayList<String> ingredients, ArrayList<String> steps, boolean published, int popularity) {
    this.id = id;
    this.name = name;
    this.imageBlobKey = imageBlobKey;
    this.tags = tags;
    this.description = description;
    this.ingredients = ingredients;
    this.steps = steps;
    this.published = published;
    this.popularity = popularity;
  }

  // haven't implemented yet
  public void setAuthorId(String id) {
    authorID = id;
  }

  public long getId() {
    return id;
  }

  public void publish() {
    published = true;
  }

  public void increasePopularity() {
    popularity++;
  }
  
  public void decreasePopularity() {
    popularity--;
  }
}

@@ -1339,318 +1339,7 @@
 %0A  %7D
-%0A%0A  // haven't implemented yet%0A  public void setAuthorId(String id) %7B%0A    authorID = id;%0A  %7D%0A%0A  public long getId() %7B%0A    return id;%0A  %7D%0A%0A  public void publish() %7B%0A    published = true;%0A  %7D%0A%0A  public void increasePopularity() %7B%0A    popularity++;%0A  %7D%0A  %0A  public void decreasePopularity() %7B%0A    popularity--;%0A  %7D
 %0A%7D%0A

remove unnecessary methods from Recipe