import { uuidv5 } from "../../../shared/uuidv5";
import type { UoMCategoryCreate, Schema } from "../lib/types";

const NS = "erp-kit:primitives";

type SeedRow = Omit<UoMCategoryCreate<Schema>, "id">;

export const uomCategoryIds = {
  Weight: await uuidv5(NS, "uom-category:Weight"),
  Length: await uuidv5(NS, "uom-category:Length"),
  Volume: await uuidv5(NS, "uom-category:Volume"),
  Area: await uuidv5(NS, "uom-category:Area"),
  Time: await uuidv5(NS, "uom-category:Time"),
  Quantity: await uuidv5(NS, "uom-category:Quantity"),
} as const;

export const uomCategories: Record<string, SeedRow> = {
  [uomCategoryIds.Weight]: { name: "Weight", description: "Mass and weight measurement", status: "ACTIVE" as const },
  [uomCategoryIds.Length]: { name: "Length", description: "Length and distance measurement", status: "ACTIVE" as const },
  [uomCategoryIds.Volume]: { name: "Volume", description: "Volume and capacity measurement", status: "ACTIVE" as const },
  [uomCategoryIds.Area]: { name: "Area", description: "Surface area measurement", status: "ACTIVE" as const },
  [uomCategoryIds.Time]: { name: "Time", description: "Time duration measurement", status: "ACTIVE" as const },
  [uomCategoryIds.Quantity]: { name: "Quantity", description: "Discrete count measurement", status: "ACTIVE" as const },
};
