// import { Slider } from '@alifd/next';
// export default Slider;
import ConfigProvider from '../config-provider';
import React, { Component } from 'react';
import cls from 'classnames';
// import hoistNonReactStatics from 'hoist-non-react-statics';
import { Slider as NextSlider } from '@alifd/next';
import { SliderProps as NextSliderProps } from '@alifd/next/types/slider';

interface SliderProps extends NextSliderProps {
  dotsType?: 'dot' | 'line';
}
class Slider extends Component<SliderProps> {

  render() {
    const { prefix = 'next-', dotsType = 'dot', className } = this.props;
    if (dotsType === 'line') {
      return (
        <NextSlider
          {...this.props}
          prefix={prefix}
          dotsRender={() => {
            return <button className={`${prefix}dots-line`} />;
          }}
          className={cls(
            className, {
            },
          )}
        />
      );
    }
    return (
      <NextSlider
        {...this.props}
        prefix={prefix}
        className={cls(
          className, {
          },
        )}
      />
    );
  }
}
export default ConfigProvider.config(Slider);
