I stopped and looked up, panting. No, it wasn't my imagination: the dog had definitely disappeared into the other side.
I stopped and looked up, panting: No, it hadn't been my imagination. the dog had definitely disappeared into the other side.
What's the correct form?