import React from 'react';
import classnames from 'classnames';

import IconBase from './IconBase';

import CaretLeft from '../../icons/caret-left.svg';
import CaretRight from '../../icons/caret-right.svg';
import CaretDown from '../../icons/caret-down.svg';
import CaretUp from '../../icons/caret-up.svg';
import CheckCircle from '../../icons/check-circle.svg';
import CloseCircle from '../../icons/close-circle.svg';
import InfoCircle from '../../icons/info-circle.svg';
import QuestionCircle from '../../icons/question-circle.svg';
import WarningCircle from '../../icons/warning-circle.svg';
import DoubleLeft from '../../icons/double-left.svg';
import DoubleRight from '../../icons/double-right.svg';
import WaitingCircleFill from '../../icons/waiting-circle-fill.svg';
import Close from '../../icons/close.svg';
import Check from '../../icons/check.svg';
import Setting from '../../icons/setting.svg';
import Rmb from '../../icons/rmb.svg';
import User from '../../icons/user.svg';
import Search from '../../icons/search.svg';
import Loading from '../../icons/loading.svg';
import ArrowRight from '../../icons/arrow-right.svg';
import ArrowLeft from '../../icons/arrow-left.svg';
import ClockCircle from '../../icons/clock-circle.svg';
import Left from '../../icons/left.svg';
import Right from '../../icons/right.svg';
import Up from '../../icons/up.svg';
import Down from '../../icons/down.svg';
import PlusSquare from '../../icons/plus-square.svg';
import Mail from '../../icons/mail.svg';
import DataBox from '../../icons/data-box.svg';
import Edit from '../../icons/edit.svg';
import Ellipsis from '../../icons/ellipsis.svg';

import './index.less';

const prefixCls = 'baas-icon';

const getCls = (type, cls) => classnames(`${prefixCls}-${type}`, cls);

const Icons = () => null;

Icons.CaretLeftIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={CaretLeft}
    className={getCls('caret-left', className)}
    {...restProps}
  />
);
Icons.CaretRightIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={CaretRight}
    className={getCls('caret-right', className)}
    {...restProps}
  />
);
Icons.CaretDownIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={CaretDown}
    className={getCls('caret-down', className)}
    {...restProps}
  />
);
Icons.CaretUpIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={CaretUp}
    className={getCls('caret-up', className)}
    {...restProps}
  />
);
Icons.CheckCircleIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={CheckCircle}
    className={getCls('check-circle', className)}
    {...restProps}
  />
);
Icons.CloseCircleIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={CloseCircle}
    className={getCls('close-circle', className)}
    {...restProps}
  />
);
Icons.InfoCircleIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={InfoCircle}
    className={getCls('info-circle', className)}
    {...restProps}
  />
);
Icons.QuestionCircleIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={QuestionCircle}
    className={getCls('question-circle', className)}
    {...restProps}
  />
);
Icons.WarningCircleIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={WarningCircle}
    className={getCls('warning-circle', className)}
    {...restProps}
  />
);
Icons.DoubleLeftIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={DoubleLeft}
    className={getCls('double-left', className)}
    {...restProps}
  />
);
Icons.DoubleRightIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={DoubleRight}
    className={getCls('double-right', className)}
    {...restProps}
  />
);
Icons.WaitingCircleFillIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={WaitingCircleFill}
    className={getCls('waiting-circle-fill', className)}
    {...restProps}
  />
);
Icons.CloseIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={Close}
    className={getCls('close', className)}
    {...restProps}
  />
);
Icons.CheckIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={Check}
    className={getCls('check', className)}
    {...restProps}
  />
);
Icons.SettingIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={Setting}
    className={getCls('setting', className)}
    {...restProps}
  />
);
Icons.RmbIcon = ({ className, ...restProps }) => (
  <IconBase icon={Rmb} className={getCls('rmb', className)} {...restProps} />
);
Icons.UserIcon = ({ className, ...restProps }) => (
  <IconBase icon={User} className={getCls('user', className)} {...restProps} />
);
Icons.SearchIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={Search}
    className={getCls('search', className)}
    {...restProps}
  />
);
Icons.LoadingIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={Loading}
    className={getCls('loading', className)}
    {...restProps}
  />
);
Icons.ArrowRightIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={ArrowRight}
    className={getCls('arrow-right', className)}
    {...restProps}
  />
);
Icons.ArrowLeftIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={ArrowLeft}
    className={getCls('arrow-left', className)}
    {...restProps}
  />
);
Icons.ClockCircleIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={ClockCircle}
    className={getCls('clock-circle', className)}
    {...restProps}
  />
);
Icons.LeftIcon = ({ className, ...restProps }) => (
  <IconBase icon={Left} className={getCls('left', className)} {...restProps} />
);
Icons.RightIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={Right}
    className={getCls('right', className)}
    {...restProps}
  />
);
Icons.UpIcon = ({ className, ...restProps }) => (
  <IconBase icon={Up} className={getCls('up', className)} {...restProps} />
);
Icons.DownIcon = ({ className, ...restProps }) => (
  <IconBase icon={Down} className={getCls('down', className)} {...restProps} />
);
Icons.PlusSquareIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={PlusSquare}
    className={getCls('plus-square', className)}
    {...restProps}
  />
);
Icons.MailIcon = ({ className, ...restProps }) => (
  <IconBase icon={Mail} className={getCls('mail', className)} {...restProps} />
);
Icons.DataBoxIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={DataBox}
    className={getCls('data-box', className)}
    {...restProps}
  />
);
Icons.EditIcon = ({ className, ...restProps }) => (
  <IconBase icon={Edit} className={getCls('edit', className)} {...restProps} />
);
Icons.EllipsisIcon = ({ className, ...restProps }) => (
  <IconBase
    icon={Ellipsis}
    className={getCls('ellipsis', className)}
    {...restProps}
  />
);

export default Icons;
