Plants and fungi have some very complex interactive networks capable of various forms of individual, inter-individual, and inter-species communication and intelligent decision making. From our perspective though, these interactions and decisions play out over some very different time scales from our own cognition. Suppose for a second that a tree was intelligent enough to be sentient, it would be VERY difficult for either the tree or us to recognize the intelligence and cognition in the other.
"Panic" responses, fear, and the whole manner of physiologic changes that happen in a human didn't spring up over-night. These pathways evolved a VERY long time ago. An insect has some obvious "panic" type of responses to predation attempts that are not so different from our own. As you climb up the ladder in intelligence to mammals, and then all the way to humans, there is absolutely no clear line where "panic" suddenly exists as I believe you would define it. It's a very smooth and gradual transition. Even in a human, if you've ever watched one come back to consciousness after a seizure or wake up from anesthesia, you'll see that it's also a very smooth and gradual transition to what we'd call consciousness and sentience. It's not at all an on/off switch.
I wouldn't be at all surprised if some of the same neurotransmitters and hormones fill the same role in a plant response to dangerous conditions as they would humans. I know many of the same signalling molecules are in use. Evolution doesn't like to fix what ain't broke.