Text this: Predator switching and optimal diet: insights from a generalized predator-prey model