<?php
return [
    // ── Subscription Periods ──
    ['GET',  '/subscriptions/periods',            'SubscriptionController@periods',       'members.view'],
    ['POST', '/subscriptions/periods',            'SubscriptionApiController@storePeriod', 'members.create'],
    ['POST', '/subscriptions/periods/{id}',       'SubscriptionApiController@updatePeriod','members.create'],
    ['GET',  '/api/subscriptions/periods/datatable','SubscriptionApiController@periodsDatatable','members.view'],
    ['GET',  '/api/subscriptions/periods/{id}',   'SubscriptionApiController@getPeriod',   'members.view'],

    // ── Subscriptions ──
    ['GET',  '/subscriptions',                    'SubscriptionController@index',          'members.view'],
    ['GET',  '/subscriptions/create',             'SubscriptionController@create',         'members.create'],
    ['POST', '/subscriptions',                    'SubscriptionApiController@store',       'members.create'],
    ['GET',  '/subscriptions/expiring',           'SubscriptionController@expiring',       'members.view'],
    ['GET',  '/subscriptions/bulk-renew',         'SubscriptionController@bulkRenew',      'members.create'],
    ['POST', '/subscriptions/bulk-renew',         'SubscriptionApiController@processBulkRenew','members.create'],
    ['GET',  '/subscriptions/{id}',               'SubscriptionController@show',           'members.view'],

    // ── Subscription API ──
    ['GET',  '/api/subscriptions/datatable',      'SubscriptionApiController@datatable',   'members.view'],
    ['GET',  '/api/subscriptions/expiring/datatable','SubscriptionApiController@expiringDatatable','members.view'],
    ['GET',  '/api/subscriptions/eligible',       'SubscriptionApiController@eligible',    'members.create'],
    ['GET',  '/api/subscriptions/calculate-fee',  'SubscriptionApiController@calculateFee','members.create'],

    // ── Freezes ──
    ['GET',  '/freezes',                          'FreezeController@index',                'freezes.view'],
    ['GET',  '/freezes/create',                   'FreezeController@create',               'freezes.create'],
    ['POST', '/freezes',                          'FreezeApiController@store',             'freezes.create'],
    ['GET',  '/freezes/policies',                 'FreezeController@policies',             'freezes.view'],
    ['POST', '/freezes/policies',                 'FreezeApiController@storePolicy',       'freezes.approve'],
    ['POST', '/freezes/policies/{id}',            'FreezeApiController@updatePolicy',      'freezes.approve'],
    ['GET',  '/freezes/{id}',                     'FreezeController@show',                 'freezes.view'],

    // ── Freeze API ──
    ['GET',  '/api/freezes/datatable',            'FreezeApiController@datatable',         'freezes.view'],
    ['POST', '/api/freezes/{id}/approve',         'FreezeApiController@approve',           'freezes.approve'],
    ['POST', '/api/freezes/{id}/reject',          'FreezeApiController@reject',            'freezes.approve'],
    ['POST', '/api/freezes/{id}/end',             'FreezeApiController@endFreeze',         'freezes.approve'],
    ['POST', '/api/freezes/{id}/extend',          'FreezeApiController@extend',            'freezes.approve'],
    ['GET',  '/api/freezes/policies/datatable',   'FreezeApiController@policiesDatatable', 'freezes.view'],
    ['GET',  '/api/freezes/policies/{id}',        'FreezeApiController@getPolicy',         'freezes.view'],
];