<?php
declare(strict_types=1);

return [
    // POS / Sales
    ['GET',  '/sales',                           'Sales\Controllers\SaleController@index',        ['auth'], 'sales.view'],
    ['GET',  '/sales/create',                    'Sales\Controllers\SaleController@create',       ['auth'], 'sales.create'],
    ['POST', '/sales',                           'Sales\Controllers\SaleController@store',        ['auth', 'csrf'], 'sales.create'],
    ['GET',  '/sales/{id:\d+}',                  'Sales\Controllers\SaleController@show',         ['auth'], 'sales.view'],
    ['POST', '/sales/{id:\d+}/void',             'Sales\Controllers\SaleController@void',         ['auth', 'csrf'], 'sales.void'],
    ['GET',  '/sales/{id:\d+}/refund',           'Sales\Controllers\SaleController@refundForm',   ['auth'], 'sales.refund'],
    ['POST', '/sales/{id:\d+}/refund',           'Sales\Controllers\SaleController@refund',       ['auth', 'csrf'], 'sales.refund'],
    ['GET',  '/sales/{id:\d+}/print',            'Sales\Controllers\SaleController@printInvoice', ['auth'], 'sales.view'],
    ['GET',  '/sales/member/{memberId:\d+}',     'Sales\Controllers\SaleController@memberHistory',['auth'], 'sales.view'],
    ['GET',  '/sales/search-items',              'Sales\Controllers\SaleController@searchItems',  ['auth'], 'sales.create'],
    ['GET',  '/sales/search-customers',          'Sales\Controllers\SaleController@searchCustomers',['auth'], 'sales.create'],

    // Packages
    ['GET',  '/sales/packages',                  'Sales\Controllers\PackageController@index',     ['auth'], 'package.view'],
    ['GET',  '/sales/packages/create',           'Sales\Controllers\PackageController@create',    ['auth'], 'package.manage'],
    ['POST', '/sales/packages',                  'Sales\Controllers\PackageController@store',     ['auth', 'csrf'], 'package.manage'],
    ['GET',  '/sales/packages/{id:\d+}',         'Sales\Controllers\PackageController@show',      ['auth'], 'package.view'],
    ['GET',  '/sales/packages/{id:\d+}/edit',    'Sales\Controllers\PackageController@edit',      ['auth'], 'package.manage'],
    ['POST', '/sales/packages/{id:\d+}',         'Sales\Controllers\PackageController@update',    ['auth', 'csrf'], 'package.manage'],

    // Sales Representatives & Commissions
    ['GET',  '/sales/commissions/representatives',           'Sales\Controllers\CommissionController@representatives',  ['auth'], 'sales.commission.view'],
    ['GET',  '/sales/commissions/representatives/create',    'Sales\Controllers\CommissionController@createRep',        ['auth'], 'sales.commission.manage'],
    ['POST', '/sales/commissions/representatives',           'Sales\Controllers\CommissionController@storeRep',         ['auth', 'csrf'], 'sales.commission.manage'],
    ['GET',  '/sales/commissions/report',                    'Sales\Controllers\CommissionController@report',           ['auth'], 'sales.commission.view'],
    ['GET',  '/sales/pricing/customer',                      'Sales\Controllers\CommissionController@customerPricing',  ['auth'], 'sales.pricing.view'],

    // Sales Reports
    ['GET',  '/sales/reports/daily',             'Sales\Controllers\SaleReportController@daily',   ['auth'], 'report.sales'],
    ['GET',  '/sales/reports/monthly',           'Sales\Controllers\SaleReportController@monthly', ['auth'], 'report.sales'],
    ['GET',  '/sales/reports/by-item',           'Sales\Controllers\SaleReportController@byItem',  ['auth'], 'report.sales'],
];
