Split switch into a component base class.