Paying back Mat leave top up

Does anyone have any experience paying back maternity leave top up to their employer or knows someone who has? My employer is paying my top up to 100% but stipulates I will have to pay it back if I don’t return from mat leave and work for them another year. I’m hoping to go back to work, but I’ve been coming up with what if scenarios as I’m not from Canada originally and in the event I have to move home for family support I want to know how paying back generally works. Do you pay back the gross amount? Net amount? What happens at tax time? If anyone has any insight please share, thanks!