import Service from 'ember-service';
import injectService from 'ember-service/inject';

export default Service.extend({
  experiments: injectService(),
  isEnabled: false,

  checkExperiment() {
    return this.get('experiments').getExperimentValue('CHANNEL_VIDEOS_TAB').then(value => {
      if (this.isDestroyed) { return; }
      this.set('isEnabled', value === 'mixed');
    });
  }
});
