import React from 'react'

type TenantStatusChipProps = {
  isActive?: boolean | null
  className?: string
}

const TenantStatusChip = ({ isActive = false, className = '' }: TenantStatusChipProps) => {
  const label = isActive ? 'Active' : 'Inactive'
  const toneClasses = isActive
    ? 'border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900/70 dark:bg-emerald-950/40 dark:text-emerald-200'
    : 'border-rose-200 bg-rose-50 text-rose-700 dark:border-rose-900/70 dark:bg-rose-950/40 dark:text-rose-200'

  return (
    <span
      className={`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-semibold ${toneClasses} ${className}`.trim()}
    >
      {label}
    </span>
  )
}

export default TenantStatusChip
