Text this: Collective single-photon emission and energy transfer in thin-layer dielectric and plasmonic systems