<?php
function resolveCompanyScope(array $user): array|string {

    switch ($user['role']) {

        case 'super_admin':
        case 'platform_admin':
        case 'support':
            return 'GLOBAL';

        case 'rsp_admin':
            return [
                'rsp_id' => $user['company_id']
            ];

        default:
            return [
                'company_id' => $user['company_id']
            ];
    }
}
