using System.Collections;
namespace Unity.VisualScripting
{
///
/// Adds an item to a dictionary.
///
[UnitCategory("Collections/Dictionaries")]
[UnitSurtitle("Dictionary")]
[UnitShortTitle("Add Item")]
[UnitOrder(2)]
public sealed class AddDictionaryItem : Unit
{
///
/// The entry point for the node.
///
[DoNotSerialize]
[PortLabelHidden]
public ControlInput enter { get; private set; }
///
/// The dictionary.
///
[DoNotSerialize]
[PortLabel("Dictionary")]
[PortLabelHidden]
public ValueInput dictionaryInput { get; private set; }
///
/// The dictionary with the added element.
/// Note that the input dictionary is modified directly then returned.
///
[DoNotSerialize]
[PortLabel("Dictionary")]
[PortLabelHidden]
public ValueOutput dictionaryOutput { get; private set; }
///
/// The key of the item to add.
///
[DoNotSerialize]
public ValueInput key { get; private set; }
///
/// The value of the item to add.
///
[DoNotSerialize]
public ValueInput value { get; private set; }
///
/// The action to execute once the item has been added.
///
[DoNotSerialize]
[PortLabelHidden]
public ControlOutput exit { get; private set; }
protected override void Definition()
{
enter = ControlInput(nameof(enter), Add);
dictionaryInput = ValueInput(nameof(dictionaryInput));
key = ValueInput