using System;
using System.Collections;
namespace Unity.VisualScripting
{
///
/// Removes the specified item from a list.
///
[UnitCategory("Collections/Lists")]
[UnitSurtitle("List")]
[UnitShortTitle("Remove Item")]
[UnitOrder(4)]
public sealed class RemoveListItem : Unit
{
///
/// The entry point for the node.
///
[DoNotSerialize]
[PortLabelHidden]
public ControlInput enter { get; private set; }
///
/// The list.
///
[DoNotSerialize]
[PortLabel("List")]
[PortLabelHidden]
public ValueInput listInput { get; private set; }
///
/// The list without the removed item.
/// Note that the input list is modified directly and then returned,
/// except if it is an array, in which case a new array without the item
/// is returned instead.
///
[DoNotSerialize]
[PortLabel("List")]
[PortLabelHidden]
public ValueOutput listOutput { get; private set; }
///
/// The item to remove.
///
[DoNotSerialize]
[PortLabelHidden]
public ValueInput item { get; private set; }
///
/// The action to execute once the item has been removed.
///
[DoNotSerialize]
[PortLabelHidden]
public ControlOutput exit { get; private set; }
protected override void Definition()
{
enter = ControlInput(nameof(enter), Remove);
listInput = ValueInput(nameof(listInput));
listOutput = ValueOutput(nameof(listOutput));
item = ValueInput