import React from 'react';
import { PICKUP_STATUS, PICKUP_STATUS_LABELS } from '../data/constants';

const STATUS_CLASS = {
  [PICKUP_STATUS.PENDING]: 'pending',
  [PICKUP_STATUS.LOCKED]: 'locked',
  [PICKUP_STATUS.PROCESSING]: 'processing',
  [PICKUP_STATUS.COMPLETED]: 'completed',
  [PICKUP_STATUS.EXPIRED]: 'expired',
  [PICKUP_STATUS.REVOKED]: 'revoked',
};

export default function StatusTag({ status }) {
  const cls = STATUS_CLASS[status] || 'pending';
  const label = PICKUP_STATUS_LABELS[status] || status;
  return <span className={`dt-status-tag ${cls}`}>{label}</span>;
}
