Some Progress to Sharing Components Data Between Collections

Continuing the discussion from Share Components Data Between Collections:

Ok, so I’ve made some edits to components.js but some hints as to how to continue would be appreciated. I’ve added an icon to the end of each component which opens a small window when opened:

When clicking I would like to populate with the collection names which the user would click on and then clone that component into the selected collection.

At the moment this function exists within components.js:

    this.cloneComponent = function (e) {
      var item = JSON.parse(JSON.stringify(e.item.item)),
        idx = e.item.idx

      this.items.splice(idx + 1, 0, item)

        function () {
          if (opts.child) $this.propagateUpdate()

Any guidance as to how I get the collection names and then clone the component into the selected collection…?