、。
If I were you, I wouldn't have said something so stupid.
Literal
I [subject-が] you [if-なら], such stupid thing [topic-は] would-not-have-said.
言わなかったろうに stacks 言わなかった (past negative) + だろう (probability) + に (counterfactual marker) = 'would not have said [X] [but...]' — a full counterfactual construction. ばかげた is from 馬鹿 ('fool') + げる, forming an adjective 'stupid, foolish.' The final のに flavor is strong 'regret' or 'reproach.' A classic 'I would have done differently' criticism.