How to detect () and automatically change the citation style?

Many journals require such a citation style:

if the citation appears in a pair of brackets, the citation itself should drop brackets, like:

This is an example (e.g., Norman 1977 argues that .....)

Otherwise, include brackets around year in citation:

Norman (1977) argues that .....

I’m wondering if Endnote can detect whether the citation is within a pair of brackets and change the citation style automatically. If yes, how can I modify the syle file to fit that.

Thanks!