using System.Collections;
using System.Diagnostics.CodeAnalysis;
using PkmnLib.Dynamic.ScriptHandling.Registry;
using PkmnLib.Static.Utils;
namespace PkmnLib.Dynamic.ScriptHandling;
///
/// A script set is a collection of scripts that can be accessed by a key.
/// We can add, remove, and clear scripts from the set.
/// This is generally used for volatile scripts.
///
public interface IScriptSet : IEnumerable
{
///
/// Adds a script to the set. If the script with that name already exists in this set, this
/// makes that script stack instead. The return value here is that script.
/// If the script was blocked from being added, this will return null.
///
/// The script to add.
/// If true, the script cannot be blocked, and will always be added
ScriptContainer? Add(Script script, bool forceAdd = false);
///
/// Adds a script with a name to the set. If the script with that name already exists in this
/// set, this makes that script stack instead. The return value here is that script.
///
ScriptContainer? StackOrAdd(StringKey scriptKey, Func