1. A lighting device comprising;a first tubular part,
a second tubular part flexibly connected to the first tubular part so that the lighting device is configurable in at least two configurations,
a sensor for detecting the configuration of the lighting device,
wherein each of the first and second tubular parts comprises a first light source and a second light source, the first light source being configured to emit light in a first direction and the second light source being configured to emit light in a second direction different from the first direction, and
a controller for controlling the first and second light sources, wherein an output of the sensor is fed to the controller, and
wherein, based on the output, the controller selectively powers either the first light source, the second light source, or a combination of the first and second light sources.