import type { FC } from 'react'
import type { TagSize } from '../tag'
import Tag from '../tag'
import { EnumSaleMode } from '@/common/Enumerate'

interface SaleModeProps {
  saleMode: number
  size?: TagSize
  customClassName?: string
  customStyle?: React.CSSProperties
  children?: React.ReactNode
}

const SaleModeTag: FC<SaleModeProps> = (props) => {
  const { saleMode, size = 'small', customClassName, customStyle } = props
  return (
    <>
      {saleMode === EnumSaleMode.Bulk && (
        <Tag circle type="bulk" size={size} customClassName={customClassName} customStyle={customStyle}>
          大货
        </Tag>
      )}
      {saleMode === EnumSaleMode.Plate && (
        <Tag circle type="plate" size={size} customClassName={customClassName} customStyle={customStyle}>
          剪板
        </Tag>
      )}
      {saleMode === EnumSaleMode.BulkCut && (
        <Tag circle type="bulkCut" size={size} customClassName={customClassName} customStyle={customStyle}>
          散剪
        </Tag>
      )}
    </>
  )
}
export default SaleModeTag
