public function stack($elements, $groupId, $position = null): self
    {
        $group = new Group($groupId);

        $this->filter(function ($element) use ($elements) {
            return in_array($element->id(), $elements, true);
        })->each(function ($element) use ($group) {
            $group->push($element);
            $this->items = $this->without($element->id())->all();
        });

        if ($position) {
            $this->insert($group, $position);
        } else {
            $this->push($group);
        }

        return $this;
    }