It will be pre-eclampsia rather than eclampsia. If you had eclampsia it would be a medical emergency/you'd be having seizures/baby would already be delivered. I've been admitted due to pre-e at 29 weeks, so quite early... and I have to be here until delivery. Depending on the level of protein/control of BP/blood results, it's a balance of how long it is safe to keep baby in. If the balance tips and things get worse, I will be delivered. If you are already 36 weeks and it's confirmed, you will likely be delivered early, depending on the severity of your results/symptoms.
It depends how severe it is. At 36 weeks you could stay in and be monitored until 37 weeks, have intravenous treatment to control blood pressure or be delivered straight away. They usually deliver pre-ec at 37 weeks.
I went in with severe chest pain and vomiting at about 35+4ish. They found I had high BP and protein in my wee that night. Next day I had a scan and they decided he was measuring small. Spent a few days in hospital being monitored on blood pressure tablets and was then induced. DS was born at 36+3. Symptoms all went after birth. I had to stay on the blood pressure medication for a few weeks though and had to be slowly weaned off.
I had an almost identical situation - soaring BP at 36 week appointment, admitted and testing including 24 hour urine showed no pre-e, just pregnancy induced hypertension. My baby was also starting to measure small. They kept me a few days until I was 37 weeks 0 days and induced then. They wanted to balance the risks of BP to me, risks of pre-37 weeks birth to the baby and risks of the BP causing placenta problems and restricting the baby's growth.
They may advise an epidural during labour to keep your BP under control- I was planning on one anyway so that was fine by me. I also never quite reached the threshold for blood pressure medication which I understand has some unpleasant side effects but which I would have happily taken if required.