A visibility-based approach using regularization for imaging-spectroscopy in solar X-ray astronomy