import Ember from 'ember'
export default Ember.Route.extend
  actions:
    editProject: (project)->
      @modal 'project/edit-project',
        model: project

    newProject: ->
      project = @store.createRecord 'panda/project'
      @modal 'project/edit-project',
        model: project
        title: t('action.new_model', model: t('models.project'))

    projectContract: (project) ->
      @modal 'project/contract',
        model: project

    new_project_from_contract: (project) ->
      #project ||= @store.createRecord('panda/project')
      project.rollbackAttributes() if project?.get('isNew')
      @modal 'project/new-project-from-contract'

    show_project_scenarios_grid: (project) ->
      @modal 'project/project-scenarios-show-grid',
        model: project
