import { ArrowDownToLine, ArrowUpFromLine, Building2 } from "lucide-react";

export interface RoleMeta {
  type: string;
  label: string;
  description: string;
  icon: React.ReactNode;
}

export const IMPORTER: RoleMeta = {
  type: "importer",
  label: "Importer",
  description: "Import goods into Ethiopia via the railway corridor.",
  icon: <ArrowDownToLine size={22} />,
};

export const EXPORTER: RoleMeta = {
  type: "exporter",
  label: "Exporter",
  description: "Export goods from Ethiopia via rail.",
  icon: <ArrowUpFromLine size={22} />,
};

export const FREIGHT_FORWARDER: RoleMeta = {
  type: "freight_forwarder",
  label: "Freight Forwarder",
  description: "Handle cargo on behalf of importers and exporters.",
  icon: <Building2 size={22} />,
};

/**
 * Importer / Exporter / Freight Forwarder — the services a "customer" company
 * can hold. A single company may register for any combination, each getting its
 * own business license.
 */
export const CUSTOMER_ROLES: RoleMeta[] = [IMPORTER, EXPORTER, FREIGHT_FORWARDER];

// dj_freight_forwarder and transporter are intentionally not exposed yet.
export function rolesForCompanyType(companyType: string): RoleMeta[] {
  if (companyType === "customer") return CUSTOMER_ROLES;
  if (companyType === "freight_forwarder") return [FREIGHT_FORWARDER];
  return [];
}
