Carbon-rich hot bubble detected in the planetary nebula NGC 5189