admin_import:
  path: /
  methods: [ GET, POST ]
  defaults:
    _controller: 'PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\ImportController::importAction'
    _legacy_controller: AdminImport
    _legacy_link: AdminImport

admin_import_data_configuration_index:
  path: /data
  methods: [ POST ]
  defaults:
    _controller: 'PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\ImportDataConfigurationController::indexAction'
    _legacy_controller: AdminImport

# This redirect prevents an error (redirects to import first page instead) when
# trying to access import data page with GET http method.
# It happens on direct access or when the session token expires and
# the user clicks "I understand the risk" in the warning page.
admin_import_data_configuration_index_redirect:
  path: /data
  methods: [ GET ]
  controller: 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction'
  defaults:
    route: 'admin_import'

admin_import_process:
  path: /process
  methods: [ POST ]
  defaults:
    _controller: 'PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\ImportController::processImportAction'
    _legacy_controller: AdminImport

admin_import_file_upload:
  path: /file/upload
  methods: [ POST ]
  defaults:
    _controller: 'PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\ImportController::uploadAction'
    _legacy_controller: AdminImport
    _legacy_link: AdminImport:uploadCsv

admin_import_file_delete:
  path: /file/delete
  methods: [ GET ]
  defaults:
    _controller: 'PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\ImportController::deleteAction'
    _legacy_controller: AdminImport
    _legacy_link: AdminImport:delete

admin_import_file_download:
  path: /file/download
  methods: [ GET ]
  defaults:
    _controller: 'PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\ImportController::downloadAction'
    _legacy_controller: AdminImport
    _legacy_link: AdminImport:download

admin_import_sample_download:
  path: /sample/download/{sampleName}
  methods: [ GET ]
  defaults:
    _controller: 'PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\ImportController::downloadSampleAction'
    _legacy_controller: AdminImport
    _legacy_link: AdminImport:sampleDownload

admin_import_data_configuration_create:
  path: /match
  methods: [ POST ]
  defaults:
    _controller: 'PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\ImportDataConfigurationController::createAction'
    _legacy_controller: AdminImport
    _legacy_link: AdminImport:saveImportMatch

admin_import_data_configuration_get:
  path: /match
  methods: [ GET ]
  defaults:
    _controller: 'PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\ImportDataConfigurationController::getAction'
    _legacy_controller: AdminImport
    _legacy_link: AdminImport:getImportMatch

admin_import_data_configuration_delete:
  path: /match
  methods: [ DELETE ]
  defaults:
    _controller: 'PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\ImportDataConfigurationController::deleteAction'
    _legacy_controller: AdminImport
    _legacy_link: AdminImport:deleteImportMatch

admin_import_get_available_fields:
  path: /fields
  methods: [ GET ]
  defaults:
    _controller: 'PrestaShopBundle\Controller\Admin\Configure\AdvancedParameters\ImportController::getAvailableEntityFieldsAction'
    _legacy_controller: AdminImport
    _legacy_link: AdminImport:getAvailableEntityFields
