I appreciate you giving a Gift to a Friend, so I'll try to assist.
The TV, according to it's Manual (Page 14) will output Dolby Digital (often called AC3) which is a 5.1 lossy signal, and PCM (but no specifications given); so I'll focus on Dolby Digital which is common for the sources you listed. Of course the signal coming into the TV has to be encoded with Dolby Digital for the TV to send it to the soundbar. A lot of program material isn't encoded, or encoded correctly. So don't expect perfection every time.
The information on the soundbar is dismal, but the ray of hope is you "know that hooking optical out to chromecast will auto configuration 4.1". I take that to mean if a Dolby Digital signal is sent to the soundbar, it will automatically decode it.
Selecting wide surround on the TV shouldn't affect what is transmitted via the optical Cable. It just passes through the signal the TV receives from it's input. So provided the sources selected are Dolby Digital, then the soundbar will operate as desired.
I hope this is helpful.