import { AnyAction , Dispatch } from 'redux' ; import { connect } from 'react-redux' ; import { LayerSettings } from './layer_settings' ; import { clearLayerAttribution , setLayerAttribution , updateLayerLabel , updateLayerMaxZoom , updateLayerMinZoom , updateLayerAlpha , updateLabelsOnTop , updateFittableFlag , } from '../../../actions' ; import { Attribution } from '../../../../common/descriptor_types' ; function mapDispatchToProps ( dispatch ) { return { clearLayerAttribution : ( id ) => dispatch ( clearLayerAttribution ( id ) ) , setLayerAttribution : ( id , attribution ) => dispatch ( setLayerAttribution ( id , attribution ) ) , updateLabel : ( id , label ) => dispatch ( updateLayerLabel ( id , label ) ) , updateMinZoom : ( id , minZoom ) => dispatch ( updateLayerMinZoom ( id , minZoom ) ) , updateMaxZoom : ( id , maxZoom ) => dispatch ( updateLayerMaxZoom ( id , maxZoom ) ) , updateAlpha : ( id , alpha ) => dispatch ( updateLayerAlpha ( id , alpha ) ) , updateLabelsOnTop : ( id , areLabelsOnTop ) => dispatch ( updateLabelsOnTop ( id , areLabelsOnTop ) ) , updateIncludeInFitToBounds : ( id , includeInFitToBounds ) => dispatch ( updateFittableFlag ( id , includeInFitToBounds ) ) , } ; } const connectedLayerSettings = connect ( null , mapDispatchToProps ) ( LayerSettings ) ; export { connectedLayerSettings as LayerSettings } ;