Do you believe epilepsy is a neurological condition or mental illness?

I read on Poe – Fast AI Chat that epilepsy used to be considered a mental illness by doctors in the USA in the past but later they reclassified it as a neurological condition instead.

Do you believe epilepsy is a neurological condition or mental illness?
Post Opinion