Long-lifetime coherence in a quantum emitter induced by a metasurface