import Ember from 'ember'

export default Ember.Component.extend
  classNames: ['ui', 'small', 'buttons', 'active-project-scenario-selector-component']
  project: null
  active_project_scenario: null

  actions:
    show_project_scenarios_grid: (project) ->
      @modal 'project/project-scenarios-show-grid',
        model: project
    edit_selected_project_scenario: ->
      return unless project_scenario = @get('active_project_scenario')
      @modal 'project/edit-project-scenario',
        model: project_scenario
        closeOnOverlay: false
        destroy_callback: =>
          @set 'active_project_scenario', null
