First principles calculation of the electronic-optical properties of Cu2MgSn(SxSe1−x)4