Complex sentence: After the mid- 19th century, the economy was based on coffee growing and, as the world market for indigo withered away, prospered or suffered as the world coffee price fluctuated.
Split into simpler sentences: After the mid- 19th century, the economy was based on coffee growing. As the world market for indigo withered away, the economy prospered or suffered as the world coffee price fluctuated.