import { normalizeProviderProtocolTokenWithNative } from '../../../../router/virtual-router/engine-selection/native-hub-pipeline-req-inbound-semantics.js';
function readNonEmptyString(value) {
    if (typeof value !== 'string') {
        return undefined;
    }
    const trimmed = value.trim();
    return trimmed.length ? trimmed : undefined;
}
export function resolveCompatProfileForContext(adapterContext) {
    normalizeProviderProtocolTokenWithNative(adapterContext.providerProtocol);
    const context = adapterContext;
    const explicit = readNonEmptyString(context.compatibilityProfile);
    return explicit;
}
