<?php
return [
    // ── Notification Templates ──
    ['GET',  '/communications/templates',              'CommunicationsController@templates',       'notifications.view'],
    ['GET',  '/communications/templates/create',       'CommunicationsController@templateCreate',  'notifications.send'],
    ['GET',  '/communications/templates/{id}/edit',    'CommunicationsController@templateEdit',    'notifications.send'],
    ['POST', '/communications/templates',              'CommunicationsApiController@templateStore', 'notifications.send'],
    ['POST', '/communications/templates/{id}',         'CommunicationsApiController@templateUpdate','notifications.send'],
    ['POST', '/communications/templates/{id}/delete',  'CommunicationsApiController@templateDelete','notifications.send'],
    ['GET',  '/communications/api/templates/datatable', 'CommunicationsApiController@templatesDatatable', 'notifications.view'],

    // ── Channels ──
    ['GET',  '/communications/channels',               'CommunicationsController@channels',        'notifications.view'],
    ['GET',  '/communications/channels/create',        'CommunicationsController@channelCreate',   'notifications.send'],
    ['GET',  '/communications/channels/{id}/edit',     'CommunicationsController@channelEdit',     'notifications.send'],
    ['POST', '/communications/channels',               'CommunicationsApiController@channelStore',  'notifications.send'],
    ['POST', '/communications/channels/{id}',          'CommunicationsApiController@channelUpdate', 'notifications.send'],
    ['POST', '/communications/channels/{id}/delete',   'CommunicationsApiController@channelDelete', 'notifications.send'],
    ['GET',  '/communications/api/channels/datatable', 'CommunicationsApiController@channelsDatatable', 'notifications.view'],

    // ── Triggers ──
    ['GET',  '/communications/triggers',               'CommunicationsController@triggers',        'notifications.view'],
    ['GET',  '/communications/triggers/create',        'CommunicationsController@triggerCreate',   'notifications.send'],
    ['GET',  '/communications/triggers/{id}/edit',     'CommunicationsController@triggerEdit',     'notifications.send'],
    ['POST', '/communications/triggers',               'CommunicationsApiController@triggerStore',  'notifications.send'],
    ['POST', '/communications/triggers/{id}',          'CommunicationsApiController@triggerUpdate', 'notifications.send'],
    ['POST', '/communications/triggers/{id}/delete',   'CommunicationsApiController@triggerDelete', 'notifications.send'],
    ['GET',  '/communications/api/triggers/datatable', 'CommunicationsApiController@triggersDatatable', 'notifications.view'],

    // ── Queue ──
    ['GET',  '/communications/queue',                  'CommunicationsController@queue',           'notifications.send'],
    ['GET',  '/communications/api/queue/datatable',    'CommunicationsApiController@queueDatatable', 'notifications.send'],
    ['POST', '/communications/queue/{id}/retry',       'CommunicationsApiController@queueRetry',   'notifications.send'],
    ['POST', '/communications/queue/{id}/cancel',      'CommunicationsApiController@queueCancel',  'notifications.send'],

    // ── Sent ──
    ['GET',  '/communications/sent',                   'CommunicationsController@sent',            'notifications.view'],
    ['GET',  '/communications/api/sent/datatable',     'CommunicationsApiController@sentDatatable', 'notifications.view'],

    // ── Bulk ──
    ['GET',  '/communications/bulk',                   'CommunicationsController@bulk',            'notifications.bulk'],
    ['GET',  '/communications/bulk/create',            'CommunicationsController@bulkCreate',      'notifications.bulk'],
    ['GET',  '/communications/bulk/{id}',              'CommunicationsController@bulkView',        'notifications.bulk'],
    ['POST', '/communications/bulk',                   'CommunicationsApiController@bulkStore',     'notifications.bulk'],
    ['POST', '/communications/bulk/{id}/send',         'CommunicationsApiController@bulkSend',      'notifications.bulk'],
    ['POST', '/communications/bulk/{id}/cancel',       'CommunicationsApiController@bulkCancel',    'notifications.bulk'],
    ['GET',  '/communications/api/bulk/datatable',     'CommunicationsApiController@bulkDatatable', 'notifications.bulk'],
    ['GET',  '/communications/api/bulk/{id}/recipients','CommunicationsApiController@bulkRecipients','notifications.bulk'],

    // ── Logs ──
    ['GET',  '/communications/email-log',              'CommunicationsController@emailLog',        'notifications.view'],
    ['GET',  '/communications/sms-log',                'CommunicationsController@smsLog',          'notifications.view'],
    ['GET',  '/communications/api/email-log/datatable','CommunicationsApiController@emailLogDatatable','notifications.view'],
    ['GET',  '/communications/api/sms-log/datatable',  'CommunicationsApiController@smsLogDatatable', 'notifications.view'],

    // ── Announcements ──
    ['GET',  '/communications/announcements',              'CommunicationsController@announcements',       'notifications.send'],
    ['GET',  '/communications/announcements/create',       'CommunicationsController@announcementCreate',  'notifications.send'],
    ['GET',  '/communications/announcements/{id}/edit',    'CommunicationsController@announcementEdit',    'notifications.send'],
    ['POST', '/communications/announcements',              'CommunicationsApiController@announcementStore', 'notifications.send'],
    ['POST', '/communications/announcements/{id}',         'CommunicationsApiController@announcementUpdate','notifications.send'],
    ['POST', '/communications/announcements/{id}/delete',  'CommunicationsApiController@announcementDelete','notifications.send'],
    ['POST', '/communications/announcements/{id}/toggle-publish','CommunicationsApiController@announcementTogglePublish','notifications.send'],
    ['POST', '/communications/announcements/{id}/toggle-pin',   'CommunicationsApiController@announcementTogglePin','notifications.send'],
    ['GET',  '/communications/api/announcements/datatable','CommunicationsApiController@announcementsDatatable','notifications.send'],

    // ── Document Templates ──
    ['GET',  '/communications/document-templates',              'CommunicationsController@docTemplates',       'documents.view'],
    ['GET',  '/communications/document-templates/create',       'CommunicationsController@docTemplateCreate',  'documents.manage'],
    ['GET',  '/communications/document-templates/{id}/edit',    'CommunicationsController@docTemplateEdit',    'documents.manage'],
    ['POST', '/communications/document-templates',              'CommunicationsApiController@docTemplateStore', 'documents.manage'],
    ['POST', '/communications/document-templates/{id}',         'CommunicationsApiController@docTemplateUpdate','documents.manage'],
    ['POST', '/communications/document-templates/{id}/delete',  'CommunicationsApiController@docTemplateDelete','documents.manage'],
    ['GET',  '/communications/api/document-templates/datatable','CommunicationsApiController@docTemplatesDatatable','documents.view'],

    // ── Document Generation ──
    ['GET',  '/communications/documents/generate',     'CommunicationsController@generateDocument',  'documents.manage'],
    ['POST', '/communications/documents/generate',     'CommunicationsApiController@generateDocumentPost', 'documents.manage'],
    ['POST', '/communications/documents/preview',      'CommunicationsApiController@previewDocument',      'documents.manage'],
    ['GET',  '/communications/api/generated/datatable', 'CommunicationsApiController@generatedDatatable',  'documents.view'],
];