<?php

// Web routes  for lead.

include('routes.php');


if (Trans::isMultilingual()) {
    Route::group(
        [
            'prefix' => '{trans}',
            'where'  => ['trans' => Trans::keys('|')],
        ],
        function () {
            include('routes.php');

        }
    );
}

// Workflow routes for lead

Route::prefix('{guard}/lead')->group(function () {

    Route::get('/workflow/{lead}/{user}', 'LeadWorkflowController@get')
        ->name('bixo.lead.workflow');
    Route::post('/workflow/{lead}/{user}', 'LeadWorkflowController@post');

    Route::get('/action/{lead}/{user}', 'LeadActionController@get')
        ->name('bixo.lead.action');
    Route::post('/action/{lead}/{user}', 'LeadActionController@post');

});


// Workflow routes for blacklist

Route::prefix('{guard}/blacklist')->group(function () {

    Route::get('/workflow/{blacklist}/{user}', 'BlacklistWorkflowController@get')
        ->name('bixo.lead.workflow');
    Route::post('/workflow/{blacklist}/{user}', 'BlacklistWorkflowController@post');

    Route::get('/action/{blacklist}/{user}', 'BlacklistActionController@get')
        ->name('bixo.lead.action');
    Route::post('/action/{blacklist}/{user}', 'BlacklistActionController@post');

});