public void ToggleTag(string newTag)
 {
     if (!TagsToInclude.Contains(newTag))
     {
         TagsToInclude.Add(newTag);
     }
     else if (TagsToInclude.Contains(newTag))
     {
         TagsToInclude.Remove(newTag);
     }
 }
 public void ClearPreference(string tag)
 {
     if (TagsToInclude.Remove(tag) || TagsToExclude.Remove(tag))
     {
         Debug.Log($"Cleared preference for tag '{tag}'.");
     }
     else
     {
         Debug.Log($"Tag '{tag}' already set to 'no preference'.");
     }
 }
    public void ActivateExcludeTag(string tag)
    {
        if (TagsToInclude.Contains(tag))
        {
            TagsToInclude.Remove(tag);
        }

        if (TagsToExclude.Add(tag))
        {
            Debug.Log($"Excluded tag '{tag}'.");
        }
        else
        {
            Debug.Log($"Tag '{tag}' is already excluded.");
        }
    }
    /// <summary>
    /// Call database class and receive the list of recipes
    /// </summary>
    /// <param name="recipeName">Name of the recipe to searched</param>
    public void SearchForRecipes(string recipeName)
    {
        if (string.IsNullOrWhiteSpace(recipeName))
        {
            return;
        }

        Debug.Log($"Performing search for {recipeName} with the following parameters:");
        Debug.Log($"'Exclude' preferences: ({string.Join(", ", TagsToExclude)})");
        Debug.Log($"'Include' preferences: ({string.Join(", ", TagsToInclude)})");

        DatabaseManager.Instance.elasticSearchExclude(recipeName, TagsToExclude.ToArray(), TagsToInclude.ToArray());
    }