package tacos.ingredients;

import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import tacos.ingredients.Ingredient.Type;

@Configuration
public class DevelopmentConfig {

  @Bean
  public CommandLineRunner dataLoader(IngredientRepository repo) {
    return args -> {
      repo.save(new Ingredient("FLTO", "pszenna", Type.WRAP));
      repo.save(new Ingredient("COTO", "kukurydziana", Type.WRAP));
      repo.save(new Ingredient("GRBF", "mielona wołowina", Type.PROTEIN));
      repo.save(new Ingredient("CARN", "kawałki mięsa", Type.PROTEIN));
      repo.save(new Ingredient("TMTO", "pomidory pokrojone w kostkę", Type.VEGGIES));
      repo.save(new Ingredient("LETC", "sałata", Type.VEGGIES));
      repo.save(new Ingredient("CHED", "cheddar", Type.CHEESE));
      repo.save(new Ingredient("JACK", "Monterrey Jack", Type.CHEESE));
      repo.save(new Ingredient("SLSA", "pikantny sos pomidorowy", Type.SAUCE));
      repo.save(new Ingredient("SRCR", "śmietana", Type.SAUCE));
    };
  }
  
}
