import type { Map as MbMap } from '@kbn/mapbox-gl' ; import { StaticStyleProperty } from './static_style_property' ; import { ColorStaticOptions } from '../../../../../common/descriptor_types' ; export class StaticColorProperty extends StaticStyleProperty < ColorStaticOptions > { syncCircleColorWithMb ( mbLayerId , mbMap , alpha ) { mbMap . setPaintProperty ( mbLayerId , 'circle-color' , this . _options . color ) ; mbMap . setPaintProperty ( mbLayerId , 'circle-opacity' , alpha ) ; } syncFillColorWithMb ( mbLayerId , mbMap , alpha ) { mbMap . setPaintProperty ( mbLayerId , 'fill-color' , this . _options . color ) ; mbMap . setPaintProperty ( mbLayerId , 'fill-opacity' , alpha ) ; } syncIconColorWithMb ( mbLayerId , mbMap ) { mbMap . setPaintProperty ( mbLayerId , 'icon-color' , this . _options . color ) ; } syncHaloBorderColorWithMb ( mbLayerId , mbMap ) { mbMap . setPaintProperty ( mbLayerId , 'icon-halo-color' , this . _options . color ) ; } syncLineColorWithMb ( mbLayerId , mbMap , alpha ) { mbMap . setPaintProperty ( mbLayerId , 'line-color' , this . _options . color ) ; mbMap . setPaintProperty ( mbLayerId , 'line-opacity' , alpha ) ; } syncCircleStrokeWithMb ( mbLayerId , mbMap , alpha ) { mbMap . setPaintProperty ( mbLayerId , 'circle-stroke-color' , this . _options . color ) ; mbMap . setPaintProperty ( mbLayerId , 'circle-stroke-opacity' , alpha ) ; } syncLabelColorWithMb ( mbLayerId , mbMap , alpha ) { mbMap . setPaintProperty ( mbLayerId , 'text-color' , this . _options . color ) ; mbMap . setPaintProperty ( mbLayerId , 'text-opacity' , alpha ) ; } syncLabelBorderColorWithMb ( mbLayerId , mbMap ) { mbMap . setPaintProperty ( mbLayerId , 'text-halo-color' , this . _options . color ) ; } }