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

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

  isEnabled: false,
  checkPlaylistTabExperiment() {
    return this.get('experiments').getExperimentValue('PERPETUA').then(value => {
      if (this.isDestroyed) { return; }
      this.set('isEnabled', ['early', 'mid'].includes(value));
    });
  }
});
