Pretty sad. That was the beginning of the turmoil that ended in the Spanish Civil War and Franco's dictatorship.
The decadence was visible in Spain at the end of the 19th century. At the time Spain had the technology to blew the American fleet away. Monturiol and others were ahead of the rest in the developing of submarines. But the state wasn't interested in expending money to put those prototypes to work, and when the time came, the Spanish fleet was a pitty. Otherwise, the Spanish American war could have had other result.
However, Spain also need a lesson at those times. The true is that Spain's former colonies were indiferent to Spain's fate. After all, Spain was attacking them and bombarding theirs ports up to some decades before the events of 1898.
Like all the former powers, Spain had to learn to leave theirs colonies free. Pretty sad there are still countries that have colonies and that haven't learn the lesson... as yet.