remove(elements) {
    if (!elements.length) {
      return;
    }

    const collection = arrayUnique(elements);

    const oldItems = collection.map((element) => this.getItemByElement(element)).filter((item) => !!item);

    const handleLayout = () => {
      this._disposeItems(oldItems);

      // Remove the collection in the callback
      collection.forEach((element) => {
        element.parentNode.removeChild(element);
      });

      this._dispatch(Shuffle.EventType.REMOVED, { collection });
    };

    // Hide collection first.
    this._toggleFilterClasses({
      visible: [],
      hidden: oldItems,
    });

    this._shrink(oldItems);

    this.sort();

    // Update the list of items here because `remove` could be called again
    // with an item that is in the process of being removed.
    this.items = this.items.filter((item) => !oldItems.includes(item));
    this._updateItemCount();

    this.once(Shuffle.EventType.LAYOUT, handleLayout);
  }
Remove 1 or more shuffle items.
@param {Element[]} elements An array containing one or more
    elements in shuffle
@return {Shuffle} The shuffle instance.