First-principles study on electromagnetic properties of Mn-doped GaN