Indirect coupling of magnons by cavity photons