<?php
return [
    // ─── Page Routes ───
    ['GET',  '/members',                                'MemberController@index',    'members.view'],
    ['GET',  '/members/create',                         'MemberController@create',   'members.create'],
    ['GET',  '/members/{id}',                           'MemberController@show',     'members.view'],
    ['GET',  '/members/{id}/edit',                      'MemberController@edit',     'members.edit'],
    ['GET',  '/members/{id}/print',                     'MemberController@printView','members.view'],
    ['GET',  '/membership-types',                       'MembershipTypeController@index',  'members.view'],
    ['GET',  '/membership-types/create',                'MembershipTypeController@create', 'members.create'],
    ['GET',  '/membership-types/{id}/edit',             'MembershipTypeController@edit',   'members.edit'],
    ['GET',  '/membership-categories',                  'MembershipCategoryController@index','members.view'],

    // ─── Member API Routes ───
    ['GET',  '/api/members/datatable',                  'MemberApiController@datatable',    'members.view'],
    ['GET',  '/api/members/search',                     'MemberApiController@search',       'members.view'],
    ['GET',  '/api/members/stats',                      'MemberApiController@stats',        'members.view'],
    ['POST', '/api/members/store',                      'MemberApiController@store',        'members.create'],
    ['POST', '/api/members/{id}/update',                'MemberApiController@update',       'members.edit'],
    ['POST', '/api/members/{id}/delete',                'MemberApiController@delete',       'members.delete'],
    ['POST', '/api/members/{id}/status',                'MemberApiController@changeStatus', 'members.status'],
    ['GET',  '/api/members/{id}/financial',             'MemberApiController@financial',    'members.financial'],
    ['GET',  '/api/members/export',                     'MemberApiController@export',       'members.view'],
    ['POST', '/api/members/{id}/notes',                 'MemberApiController@addNote',      'members.edit'],
    ['POST', '/api/members/{id}/notes/{noteId}/delete', 'MemberApiController@deleteNote',   'members.edit'],
    ['POST', '/api/members/{id}/tags',                  'MemberApiController@addTag',       'members.edit'],
    ['POST', '/api/members/{id}/tags/{tagId}/delete',   'MemberApiController@deleteTag',    'members.edit'],
    ['POST', '/api/members/{id}/documents/upload',      'MemberApiController@uploadDocument','members.edit'],
    ['POST', '/api/members/{id}/documents/{docId}/verify','MemberApiController@verifyDocument','members.edit'],
    ['POST', '/api/members/{id}/documents/{docId}/delete','MemberApiController@deleteDocument','members.edit'],

    // ─── Dependent API Routes ───
    ['GET',  '/api/members/{id}/dependents/datatable',           'DependentApiController@datatable', 'dependents.view'],
    ['POST', '/api/members/{id}/dependents/store',               'DependentApiController@store',     'dependents.manage'],
    ['GET',  '/api/members/{id}/dependents/{depId}',             'DependentApiController@get',       'dependents.view'],
    ['POST', '/api/members/{id}/dependents/{depId}/update',      'DependentApiController@update',    'dependents.manage'],
    ['POST', '/api/members/{id}/dependents/{depId}/delete',      'DependentApiController@delete',    'dependents.manage'],

    // ─── Membership Type API Routes ───
    ['GET',  '/api/membership-types/datatable',         'MembershipTypeApiController@datatable','members.view'],
    ['GET',  '/api/membership-types/list',              'MembershipTypeApiController@list',     'members.view'],
    ['POST', '/api/membership-types/store',             'MembershipTypeApiController@store',    'members.create'],
    ['POST', '/api/membership-types/{id}/update',       'MembershipTypeApiController@update',   'members.edit'],
    ['POST', '/api/membership-types/{id}/delete',       'MembershipTypeApiController@delete',   'members.delete'],

    // ─── Membership Category API Routes ───
    ['GET',  '/api/membership-categories/datatable',    'MembershipCategoryApiController@datatable','members.view'],
    ['GET',  '/api/membership-categories/list',         'MembershipCategoryApiController@list',     'members.view'],
    ['POST', '/api/membership-categories/store',        'MembershipCategoryApiController@store',    'members.create'],
    ['POST', '/api/membership-categories/{id}/update',  'MembershipCategoryApiController@update',   'members.edit'],
    ['POST', '/api/membership-categories/{id}/delete',  'MembershipCategoryApiController@delete',   'members.delete'],

    // ─── Endorsement API Routes ───
    ['POST', '/api/members/{id}/endorsements',          'EndorsementApiController@store',  'members.edit'],
];