There’s likely an understanding that if you decline the invitation you will not be sending a gift, and that’s ok. However, especially if you are close to the person, you should consider sending a gift if you’ve been invited. Or, at least send your well wishes in a card or handwritten note. If you do send a gift, you can spend less than you might if you were attending.