import Component from 'ember-component';

export default Component.extend({
  // Passed-in
  playlist: null,
  closeModal: null,
  didClear: null,

  actions: {
    clearPlaylist() {
      let playlist = this.get('playlist');
      playlist.destroyRecord().then(() => {
        this.get('didClear')();
      });

      this.get('closeModal')();
    }
  }
});
