import type { Item, ItemTaxonomyAssignment, Schema, TaxonomyNode } from "../lib/types";

// Item fixtures
export const baseDraftItem = {
  id: "item-1",
  sku: "SKU-001",
  name: "Draft Widget",
  barcode: null,
  unitId: "unit-kg",
  status: "DRAFT",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Item<Schema>;

export const baseActiveItem = {
  id: "item-2",
  sku: "SKU-002",
  name: "Active Widget",
  barcode: "BAR-002",
  unitId: "unit-kg",
  status: "ACTIVE",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Item<Schema>;

export const baseInactiveItem = {
  id: "item-3",
  sku: "SKU-003",
  name: "Inactive Widget",
  barcode: "BAR-003",
  unitId: "unit-kg",
  status: "INACTIVE",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Item<Schema>;

// TaxonomyNode fixtures
export const baseRootNode = {
  id: "node-1",
  code: "ELECTRONICS",
  name: "Electronics",
  parentId: null,
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies TaxonomyNode<Schema>;

export const baseChildNode = {
  id: "node-2",
  code: "SMARTPHONES",
  name: "Smartphones",
  parentId: "node-1",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies TaxonomyNode<Schema>;

export const baseLeafNode = {
  id: "node-3",
  code: "ANDROID",
  name: "Android Phones",
  parentId: "node-2",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies TaxonomyNode<Schema>;

export const secondRootNode = {
  id: "node-4",
  code: "GIFTS",
  name: "Gift Ideas",
  parentId: null,
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies TaxonomyNode<Schema>;

// ItemTaxonomyAssignment fixtures
export const baseAssignment = {
  id: "assignment-1",
  itemId: "item-2",
  taxonomyNodeId: "node-2",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies ItemTaxonomyAssignment<Schema>;
