Benzimidazole-based imine-linked chemosensor: chromogenic sensor for Mg2+ and fluorescent sensor for Cr3+