/**
 * Default calculation rules — used as fallback when no DB rules are configured.
 *
 * These encode the business defaults:
 * - Vacation: person is chargeable, project is NOT charged
 * - Sick: person is chargeable, project is NOT charged
 * - Public holiday: no chargeability effect, no project cost
 */

import type { CalculationRule } from "@capakraken/shared";

const now = new Date();

export const DEFAULT_CALCULATION_RULES: CalculationRule[] = [
  {
    id: "default_vacation",
    name: "Urlaub — Person chargeable, Projekt nicht belastet",
    description: "Vacation days count toward chargeability but are not charged to the project.",
    triggerType: "VACATION",
    projectId: null,
    orderType: null,
    costEffect: "ZERO",
    costReductionPercent: null,
    chargeabilityEffect: "COUNT",
    priority: 0,
    isActive: true,
    createdAt: now,
    updatedAt: now,
  },
  {
    id: "default_sick",
    name: "Krankheit — Person chargeable, Projekt nicht belastet",
    description: "Sick days count toward chargeability but are not charged to the project.",
    triggerType: "SICK",
    projectId: null,
    orderType: null,
    costEffect: "ZERO",
    costReductionPercent: null,
    chargeabilityEffect: "COUNT",
    priority: 0,
    isActive: true,
    createdAt: now,
    updatedAt: now,
  },
  {
    id: "default_public_holiday",
    name: "Feiertag — kein Effekt",
    description: "Public holidays are neither chargeable nor charged to projects.",
    triggerType: "PUBLIC_HOLIDAY",
    projectId: null,
    orderType: null,
    costEffect: "ZERO",
    costReductionPercent: null,
    chargeabilityEffect: "SKIP",
    priority: 0,
    isActive: true,
    createdAt: now,
    updatedAt: now,
  },
];
