function normalizeModeId(raw) {
    return String(raw ?? '').trim();
}
function readOptionModeId(option) {
    if ('id' in option)
        return normalizeModeId(option.id);
    return normalizeModeId(option.value);
}
export function resolveRequestedSessionModeId(requestedModeId, options) {
    const normalizedRequestedModeId = normalizeModeId(requestedModeId);
    if (normalizedRequestedModeId !== 'default')
        return normalizedRequestedModeId;
    return Array.isArray(options) && options.some((option) => readOptionModeId(option) === 'default')
        ? 'default'
        : '';
}
//# sourceMappingURL=sessionModeIds.js.map