Fetching details from the dictionary...

thank you (for the meal); that was a delicious meal
thank you (for displaying lovey-dovey behaviour)
ごちそうさま、美味しかったです。
Thank you for the meal, it was delicious.
食事の後でごちそうさまと言った。
I said 'thank you for the meal' after eating.
ごちそうさまでした、また来ます。
Thank you for the meal, I'll come again.