import { FC } from 'react';
import { MapProps } from '@sensoro/react-amap';
import { MAP_STYLES } from '@/config/map';

interface ThemeProps extends MapProps {
  __map__?: any;
  value: string;
}

const Theme: FC<ThemeProps> = props => {
  const { __map__, value } = props;

  __map__.setMapStyle(value);
  return null;
};

Theme.defaultProps = {
  value: MAP_STYLES.whiteSmoke,
};

export default Theme;
