ActorComponent replication condition

I have an ActorComponent that is used by multiple actors. This ActorComponent needs to replicate but using different conditons depending on the type of actor.

For some Actors, I only want to replciate the ActorComponent using COND_OwnerOnly. For other actors, I want to replicate the component to all clients using the default DOREPLIFETIME macro.

Is there a way for me to do this?

I know that replication can be controlled like this with variables on the actor but what about components that replicate? Can I have the components variables replicate “to owner only” for one type of actor and “to all” for another type of actor?

Components have a virtual method called GetReplicationCondition that I believe you can override to define when a component should replicate