<?php
declare(strict_types=1);

return [
    // Pricing Dashboard
    ['GET',  '/pricing',                          'Pricing\Controllers\PricingDashboardController@index',             ['auth'], 'pricing.view'],
    ['POST', '/pricing/section/{category}',       'Pricing\Controllers\PricingDashboardController@saveSection',       ['auth', 'csrf'], 'pricing.edit'],
    ['POST', '/pricing/annual-rates',             'Pricing\Controllers\PricingDashboardController@saveAnnualRates',   ['auth', 'csrf'], 'pricing.edit'],
    ['POST', '/pricing/annual-rates/add-year',    'Pricing\Controllers\PricingDashboardController@addYear',           ['auth', 'csrf'], 'pricing.edit'],
    ['POST', '/pricing/membership-prices',        'Pricing\Controllers\PricingDashboardController@saveMembershipPrices', ['auth', 'csrf'], 'pricing.edit'],

    // Rule versioning
    ['GET',  '/pricing/rule/{ruleCode}/versions',      'Pricing\Controllers\PricingDashboardController@ruleVersions',      ['auth'], 'pricing.view'],
    ['POST', '/pricing/rule/{ruleCode}/add-version',   'Pricing\Controllers\PricingDashboardController@addRuleVersion',    ['auth', 'csrf'], 'pricing.edit'],

    // Legacy pricing configs
    ['GET',  '/pricing/configs',            'Pricing\Controllers\PricingController@index',  ['auth'], 'pricing.view'],
    ['GET',  '/pricing/configs/{id:\d+}/edit',  'Pricing\Controllers\PricingController@edit',   ['auth'], 'pricing.edit'],
    ['POST', '/pricing/configs/{id:\d+}',       'Pricing\Controllers\PricingController@update', ['auth', 'csrf'], 'pricing.edit'],

    // Special Discounts
    ['GET',  '/pricing/special-discounts',                  'Pricing\Controllers\SpecialDiscountController@index',        ['auth'], 'pricing.special_discounts.view'],
    ['GET',  '/pricing/special-discounts/create',           'Pricing\Controllers\SpecialDiscountController@create',       ['auth'], 'pricing.special_discounts.create'],
    ['POST', '/pricing/special-discounts',                  'Pricing\Controllers\SpecialDiscountController@store',        ['auth', 'csrf'], 'pricing.special_discounts.create'],
    ['GET',  '/pricing/special-discounts/{id:\d+}/edit',    'Pricing\Controllers\SpecialDiscountController@edit',         ['auth'], 'pricing.special_discounts.edit'],
    ['POST', '/pricing/special-discounts/{id:\d+}',         'Pricing\Controllers\SpecialDiscountController@update',       ['auth', 'csrf'], 'pricing.special_discounts.edit'],
    ['POST', '/pricing/special-discounts/{id:\d+}/toggle',  'Pricing\Controllers\SpecialDiscountController@toggleActive', ['auth', 'csrf'], 'pricing.special_discounts.edit'],
];