 CurrentUser               = require '../../../models/current_user.coffee'
 ArtworkColumnsView        = require '../../../components/artwork_columns/view.coffee'
 Artworks                  = require '../../../collections/artworks.coffee'
+ShareView                 = require '../../../components/share/view.coffee'
 
 artworkColumns                  = -> require('../../../components/artwork_columns/template.jade') arguments...
 setsTemplate                    = -> require('../templates/sets.jade') arguments...

        @appendArtworks newSaleArtworks
      artworksSuccess: (saleFeaturedSet) =>
        @setupArtworks saleFeaturedSet

  appendArtworks: (artworks) ->
    @artworkColumns ?= new ArtworkColumnsView

      @artworkCollection.addRepoArtworks artworks
      @artworkCollection.syncSavedArtworks()

  setupShareButtons: -> new ShareView el: @$('.feature-share')

  getArtworksOrderedByArtist: (collection) ->
    collection.comparator = (model) -> model.get('artist')?.sortable_id
    collection.sort()
