export const baseAvailability = {
  monday: 8,
  tuesday: 8,
  wednesday: 8,
  thursday: 8,
  friday: 8,
  saturday: 0,
  sunday: 0,
};

export function buildBaseProject() {
  return {
    id: "project_1",
    name: "Gelddruckmaschine",
    shortCode: "GDM",
    status: "ACTIVE",
    responsiblePerson: null,
  };
}

export function buildBaseResource(id = "resource_1") {
  return {
    id,
    eid: id === "resource_1" ? "E-001" : `E-${id}`,
    displayName: id === "resource_1" ? "Alice" : `Resource ${id}`,
    lcrCents: 5000,
    availability: {
      ...baseAvailability,
    },
  };
}

export function buildBaseAssignment() {
  return {
    id: "assignment_1",
    demandRequirementId: null,
    resourceId: "resource_1",
    projectId: "project_1",
    startDate: new Date("2026-03-16"),
    endDate: new Date("2026-03-20"),
    hoursPerDay: 4,
    percentage: 50,
    role: "Compositor",
    roleId: "role_comp",
    dailyCostCents: 20000,
    status: "PROPOSED",
    metadata: {},
    createdAt: new Date("2026-03-13"),
    updatedAt: new Date("2026-03-13"),
    resource: buildBaseResource(),
    project: { id: "project_1", name: "Project One", shortCode: "PRJ" },
    roleEntity: { id: "role_comp", name: "Compositor", color: "#111111" },
    demandRequirement: null,
  };
}
