import React from 'react'
import { FilterRightHelperType } from '../../types/searchSelect'

import { Tag } from 'antd'

type ComponentProps = {
  type: FilterRightHelperType
  onClick?: () => any
}

const FilterRightHelper: React.FC<ComponentProps> = ({ type, onClick }) => {
  if (type === 'SINGLE_TIP')
    return (
      <Tag color="blue" style={{ marginLeft: 10 }}>
        单选
      </Tag>
    )

  if (type === 'MULTIPLE_TIP')
    return (
      <Tag color="cyan" style={{ marginLeft: 10 }}>
        多选
      </Tag>
    )

  if (type === 'SUBMIT_BTN')
    return (
      <Tag color="#1890ff" style={{ marginLeft: 10, cursor: 'pointer' }} onClick={onClick}>
        提交
      </Tag>
    )

  if (type === 'SUBMIT_BAN')
    return (
      <Tag color="#d9d9d9" style={{ marginLeft: 10, cursor: 'no-drop' }}>
        提交
      </Tag>
    )

  return null
}

export default FilterRightHelper
