import { ComponentConfig } from "@/types/component";

export interface StatusCountItem {
  value: string;
  label: string;
  color: string; // "green" | "blue" | "orange" | "red" | "gray" | "purple" | hex color
}

export interface StatusCountConfig extends ComponentConfig {
  title?: string;
  tableName: string;
  statusColumn: string;
  relationColumn: string;
  parentColumn?: string;
  items: StatusCountItem[];
  showTotal?: boolean;
  cardSize?: "sm" | "md" | "lg";
}

export const STATUS_COLOR_MAP: Record<string, { bg: string; text: string; border: string }> = {
  green: { bg: "bg-emerald-50", text: "text-emerald-600", border: "border-emerald-200" },
  blue: { bg: "bg-blue-50", text: "text-blue-600", border: "border-blue-200" },
  orange: { bg: "bg-orange-50", text: "text-orange-500", border: "border-orange-200" },
  red: { bg: "bg-red-50", text: "text-red-500", border: "border-red-200" },
  gray: { bg: "bg-gray-50", text: "text-gray-500", border: "border-gray-200" },
  purple: { bg: "bg-purple-50", text: "text-purple-600", border: "border-purple-200" },
  yellow: { bg: "bg-yellow-50", text: "text-yellow-600", border: "border-yellow-200" },
  cyan: { bg: "bg-cyan-50", text: "text-cyan-600", border: "border-cyan-200" },
};
