Answerly::Engine.routes.draw do
  get 'blueprints', to: "/blueprints#index", as: 'answerly_blueprints'
  get 'blueprint', to: "/blueprints#show", as: 'answerly_blueprint'
  get 'new_blueprint', to: "/blueprints#new", as: 'answerly_new_blueprint'
  put 'publish_blueprint/:id', to: "/blueprints#publish", as: 'answerly_publish_blueprint'

  get 'new_template_section', to: "/template_sections#new", as: 'answerly_new_template_section'
  get 'edit_template_section/:id', to: "/template_sections#edit", as: 'answerly_edit_template_section'
  get 'cancel_edit_template_section/:id', to: "/template_sections#cancel", as: 'answerly_cancel_edit_template_section'
  get 'cancel_add_template_section', to: "/template_sections#cancel_add", as: 'answerly_cancel_add_template_section'
  put 'update_template_section/:id', to: "/template_sections#update", as: 'answerly_update_template_section'
  post 'create_template_section', to: "/template_sections#create", as: 'answerly_create_template_section'
  get 'set_up_order_template_section', to: "/template_sections#set_up_order", as: 'answerly_set_up_order_template_section'
  put 'reorder_template_section', to: "/template_sections#reorder", as: 'answerly_reorder_template_section'
  get 'cancel_reorder_template_section', to: "/template_sections#cancel_reorder", as: 'answerly_cancel_reorder_template_section'
  put 'template_questions_reorder', to: "/template_questions#reorder", as: 'answerly_template_questions_reorder'
  delete 'remove_template_section/:id', to: "/template_sections#destroy", as: 'answerly_remove_template_section'

  get 'survey_runs/:id', to: "/survey_runs#show", as: 'answerly_survey_run'
  get 'survey_runs_setup/:id', to: "/survey_runs#setup", as: 'answerly_survey_run_setup'
  get 'survey_run_participants_setup/:id', to: "/survey_runs#participants", as: 'answerly_survey_run_participants'
  put 'survey_runs/:id/review_period', to: "/survey_runs#review_period", as: 'answerly_survey_run_review_period'
  get 'survey_runs/:id/questions_setup_finished', to: "/survey_runs#questions_setup_finished", as: 'answerly_survey_run_questions_setup_finished'
  get 'survey_runs/:id/participants_setup_finished', to: "/survey_runs#participants_setup_finished", as: 'answerly_survey_run_participants_setup_finished'
  put 'survey_runs/:id/setup_finalized', to: "/survey_runs#setup_finalized", as: 'answerly_survey_run_setup_finalized'

  get 'edit_section/:id', to: "/sections#edit", as: 'answerly_edit_section'
  put 'update_section/:id', to: "/sections#update", as: 'answerly_update_section'
  get 'cancel_section/:id', to: "/sections#cancel", as: 'answerly_cancel_section'
  patch 'enable_section/:id', to: "/sections#enable", as: 'answerly_enable_section'

  put 'questions_reorder', to: "/questions#reorder", as: 'answerly_questions_reorder'

  post 'create_participant', to: '/participants#create', as: 'answerly_create_participant'
  put 'update_participant/:id', to: '/participants#update', as: 'answerly_update_participant'
  delete 'remove_participant/:id', to: '/participants#destroy', as: 'answerly_remove_participant'
  put 'participants/:id/update_role', to: '/participants#update_role', as: 'answerly_participants_update_role'
  put 'participants/update_role_all', to: '/participants#update_role_all', as: 'answerly_participants_update_role_all'
end