A theoretical investigation of intermolecular interaction of a phthalimide based “on–off” sensor with different halide ions: tuning its efficiency and electro-optical properties