<?php

return [
    /*
    |--------------------------------------------------------------------------
    | Malawi Territory — official organisation structure (THQ org chart)
    |--------------------------------------------------------------------------
    |
    | Branches in the HRM remain work locations (THQ, Monkey Bay, etc.).
    | Departments are functional units under the three secretaries reporting
    | to the Chief Secretary. HR roster labels are mapped via
    | App\Services\MalawiTerritoryOrgStructure.
    |
    */

    'leadership' => [
        'territorial-commander' => 'Territorial Commander / Chair of the Board of Trustees',
        'womens-ministries-president' => "Territorial President for Women's Ministries",
        'chief-secretary' => 'Chief Secretary / Chair of Management Board',
        'womens-ministries-secretary' => "Territorial Secretary for Women's Ministries",
    ],

    'secretaries' => [
        'business-admin' => 'Secretary for Business Admin',
        'programme' => 'Secretary for Programme',
        'personnel' => 'Secretary for Personnel',
    ],

    'units' => [
        'business-admin' => [
            'Trade',
            'Legal',
            'Statistics',
            'Finance',
            'Projects',
            'Property',
            'Public Relations',
            'IT',
        ],
        'programme' => [
            'Music',
            'Youth',
            'Social',
            'Spiritual Life',
            'Divisions & Districts',
        ],
        'personnel' => [
            'Human Resources',
            'Officers',
            'Training College',
            'Candidates',
            'Extension Training',
        ],
    ],

    /*
    | HR database / roster aliases → canonical secretary (for manager field & roles)
    */
    'manager_aliases' => [
        'chief secretary' => 'chief-secretary',
        'development secretary' => 'programme',
        'dss' => 'programme',
        'sec. for programme' => 'programme',
        'secretary for programme' => 'programme',
        'sec. for program' => 'programme',
        'secretary for program' => 'programme',
        'finance secretary' => 'business-admin',
        'secretary for business admin' => 'business-admin',
        'sec. for business admin' => 'business-admin',
        'sec. for personnel' => 'personnel',
        'secretary for personnel' => 'personnel',
        'personnel' => 'personnel',
    ],

    /*
    | Roster department column aliases → canonical unit name (before secretary inference)
    */
    'department_aliases' => [
        'it/business' => 'IT',
        'it/business ' => 'IT',
        'it' => 'IT',
        'finance' => 'Finance',
        'projects' => 'Projects',
        'projects ' => 'Projects',
        'personnel' => 'Human Resources',
        'otc' => 'Training College',
        'security' => 'Property',
        'statistics' => 'Statistics',
        'monkey bay' => 'Divisions & Districts',
        'monkeybay' => 'Divisions & Districts',
    ],

    /*
    | Legacy Spatie role slugs → new org-chart role slugs (migration on sync)
    */
    'legacy_role_slugs' => [
        'development-secretary' => 'programme-secretary',
        'finance-secretary' => 'business-admin-secretary',
        'under-development-secretary' => 'under-programme-secretary',
        'under-finance-secretary' => 'under-business-admin-secretary',
    ],
];
