import type { Company, Department, Schema, Site } from "../lib/types";

// Company fixtures
export const draftCompany = {
  id: "company-1",
  legalName: "Acme Corp",
  taxId: "TAX-12345",
  registrationNumber: "REG-67890",
  baseCurrencyId: "currency-usd",
  street: "123 Main St",
  city: "Tokyo",
  state: "Tokyo",
  postalCode: "100-0001",
  country: "JP",
  status: "DRAFT",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Company<Schema>;

export const activeCompany = {
  id: "company-2",
  legalName: "Beta Ltd",
  taxId: "TAX-99999",
  registrationNumber: "REG-88888",
  baseCurrencyId: "currency-usd",
  street: "456 Business Ave",
  city: "Osaka",
  state: "Osaka",
  postalCode: "530-0001",
  country: "JP",
  status: "ACTIVE",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Company<Schema>;

export const inactiveCompany = {
  id: "company-3",
  legalName: "Gamma Inc",
  taxId: "TAX-77777",
  registrationNumber: "REG-66666",
  baseCurrencyId: "currency-usd",
  street: "789 Closed Rd",
  city: "Nagoya",
  state: "Aichi",
  postalCode: "460-0001",
  country: "JP",
  status: "INACTIVE",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Company<Schema>;

export const draftCompanyNoCurrency = {
  id: "company-4",
  legalName: "Delta Corp",
  taxId: null,
  registrationNumber: null,
  baseCurrencyId: null,
  street: null,
  city: null,
  state: null,
  postalCode: null,
  country: null,
  status: "DRAFT",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Company<Schema>;

// Site fixtures
export const activeSite = {
  id: "site-1",
  name: "Tokyo HQ",
  type: "OFFICE",
  companyId: "company-2",
  street: "123 Office St",
  city: "Tokyo",
  state: "Tokyo",
  postalCode: "100-0001",
  country: "JP",
  timezone: "Asia/Tokyo",
  status: "ACTIVE",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Site<Schema>;

export const inactiveSite = {
  id: "site-2",
  name: "Osaka Warehouse",
  type: "WAREHOUSE",
  companyId: "company-2",
  street: "456 Warehouse Rd",
  city: "Osaka",
  state: "Osaka",
  postalCode: "530-0001",
  country: "JP",
  timezone: "Asia/Tokyo",
  status: "INACTIVE",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Site<Schema>;

// Department fixtures
export const activeDepartment = {
  id: "dept-1",
  code: "ENG",
  name: "Engineering",
  companyId: "company-2",
  parentDepartmentId: null,
  status: "ACTIVE",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Department<Schema>;

export const childDepartment = {
  id: "dept-2",
  code: "ENG-BE",
  name: "Backend Engineering",
  companyId: "company-2",
  parentDepartmentId: "dept-1",
  status: "ACTIVE",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Department<Schema>;

export const grandchildDepartment = {
  id: "dept-3",
  code: "ENG-BE-PLAT",
  name: "Platform Team",
  companyId: "company-2",
  parentDepartmentId: "dept-2",
  status: "ACTIVE",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Department<Schema>;

export const inactiveDepartment = {
  id: "dept-4",
  code: "FIN",
  name: "Finance",
  companyId: "company-2",
  parentDepartmentId: null,
  status: "INACTIVE",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Department<Schema>;

export const otherCompanyDepartment = {
  id: "dept-5",
  code: "ENG",
  name: "Engineering",
  companyId: "company-3",
  parentDepartmentId: null,
  status: "ACTIVE",
  createdAt: new Date("2024-01-01T00:00:00.000Z"),
  updatedAt: null,
} as const satisfies Department<Schema>;
