import { nanoid } from "nanoid";

type IdPrefixes =
  | "conn"
  | "cwt"
  | "ccg"
  | "audit"
  | "log"
  | "vir"
  | "virc"
  | "agg"
  | "dtok"
  | "thrd"
  | "msg"
  | "tag"
  | "mtag"
  | "proj"
  | "ppc"
  | "pc"
  | "dash"
  | "aik"
  | "sec"
  | "vpc"
  | "tile"
  | "fcfg"
  | "board"
  | "act"
  | "cmt";

export function generatePrefixedId(prefix: IdPrefixes) {
  return `${prefix}_${nanoid()}`;
}
