Sorry, I was not clear.
If no shore power, then solar/battery (perhaps generator)
If shore power and solar, but the solar can handle the load, then solar till the battery drops below a threshold.
if shore power and solar, but the solar cannot handle the load (like A/C is desired), then still...