import computed from 'ember-computed';
import Controller from 'ember-controller';
import injectService from 'ember-service/inject';
import injectController from 'ember-controller/inject';

export default Controller.extend({

  layout: injectService(),
  csgoChannels: injectController('directory/csgo/channels'),

  queryParams: ['sortBy'],
  sortBy: computed.alias('csgoChannels.sortBy'),

  actions: {
    loadMore: function () {
      if (this.get('model')) {
        this.get('model').loadMore();
      }
    }
  }
});
