A child wakes up agitated after anesthesia. Is it pain or delirium?

A child wakes up agitated after anesthesia. Is it pain or delirium?