As long as the company gives you an exit permit you can leave with a resignation.