import { Factory } from 'ember-cli-mirage';
import getServer from '../get-server';

export default Factory.extend({
  _numRecs: 0,
  channel(i) {
    return getServer().create('channel', {name: `favorite-${i}`});
  },
  streams(i) {
    let j = 0;
    let streams = [];
    for (j=0; j<this._numRecs; j++) {
      let ch = getServer().create('channel', {name: `recommended-stream-${i}-${j}`});
      streams.push({channel: ch});
    }
    return streams;
  }
});
