// Contract Template types
export interface Deliverable {
  id: string;
  name: string;
}

export interface Phase {
  id: string;
  name: string;
  deliverables: Deliverable[];
}

export interface ContractTemplate {
  id: string;
  name: string;
  description: string;
  phases: Phase[];
  isBuiltIn: boolean;
}

// Default built-in templates
export const DEFAULT_TEMPLATES: ContractTemplate[] = [
  {
    id: "simple",
    name: "Simple",
    description: "A simple contract with plan and execute phases.",
    isBuiltIn: true,
    phases: [
      {
        id: "plan",
        name: "Plan",
        deliverables: [{ id: "plan-deliverable", name: "Plan" }],
      },
      {
        id: "execute",
        name: "Execute",
        deliverables: [{ id: "pr-deliverable", name: "PR" }],
      },
    ],
  },
  {
    id: "specification",
    name: "Specification",
    description:
      "A comprehensive contract with research, specification, planning, execution, and review phases.",
    isBuiltIn: true,
    phases: [
      {
        id: "research",
        name: "Research",
        deliverables: [{ id: "research-notes", name: "Research Notes" }],
      },
      {
        id: "specify",
        name: "Specify",
        deliverables: [{ id: "requirements", name: "Requirements Document" }],
      },
      {
        id: "plan",
        name: "Plan",
        deliverables: [{ id: "plan-deliverable", name: "Plan" }],
      },
      {
        id: "execute",
        name: "Execute",
        deliverables: [{ id: "pr-deliverable", name: "PR" }],
      },
      {
        id: "review",
        name: "Review",
        deliverables: [{ id: "release-notes", name: "Release Notes" }],
      },
    ],
  },
  {
    id: "execute",
    name: "Execute",
    description:
      "A minimal contract with only an execute phase and no deliverables.",
    isBuiltIn: true,
    phases: [
      {
        id: "execute",
        name: "Execute",
        deliverables: [],
      },
    ],
  },
];
