Most Off Grid Inverters have a High Voltage DC Bus that is powered by a Mains Charger, or Solar charger (or both if necessary)
There is a DC-DC converter that charges or discharges the battery to/from the HVDC bus and an Inverter that outputs AC (Off Grid) from the HVDC bus
The mains charger...