import { business } from "../index.js";
/**
 * Represents a paragraph or section in a contract.
 */
export type TContractParagraph = {
    id: string;
    title?: string;
    content: string;
    order: number;
    type: "heading" | "clause" | "subclause" | "definition" | "exhibit";
    isRequired: boolean;
    metadata?: {
        applicableJurisdictions?: string[];
        tags?: string[];
        lastModified?: number;
        versionId?: string;
    };
};
/**
 * Contract party with signature information.
 */
export type TContractParty = {
    signingOrder: number;
    referencedAs: string;
    person: business.TPerson;
    role: "signer" | "cc" | "witness";
    signature: {
        given: boolean;
        timestamp?: number;
        location?: string;
        ip?: string;
        verifications?: any[];
    };
};
/**
 * Contract attachment like exhibits, appendices.
 */
export type TContractAttachment = {
    id: string;
    title: string;
    type: "exhibit" | "appendix" | "schedule";
    fileReference?: string;
    content?: string;
};
/**
 * Base envelope type for all contract types, extending the common document type.
 */
export type TContractEnvelope<TYPE extends string, FIELDS> = business.TDocumentEnvelope<TYPE, {
    effectiveDate: number;
    expirationDate?: number;
    status: "draft" | "negotiation" | "active" | "expired" | "terminated" | "renewed";
    parties: TContractParty[];
    paragraphs: TContractParagraph[];
    attachments?: TContractAttachment[];
} & FIELDS>;
/**
 * Employment contract specific type.
 */
export type TEmploymentContract = TContractEnvelope<"employment", {
    employmentTerms: {
        startDate: number;
        position: string;
        compensationDetails: string;
        workingHours?: string;
        location?: string;
        probationPeriod?: {
            durationInMonths: number;
            terms?: string;
        };
    };
}>;
/**
 * Non-disclosure agreement specific type.
 */
export type TNDAContract = TContractEnvelope<"nda", {
    confidentialityTerms: {
        duration: number;
        scope: string;
        exclusions?: string[];
    };
}>;
/**
 * Service agreement specific type.
 */
export type TServiceContract = TContractEnvelope<"service", {
    serviceTerms: {
        scope: string;
        deliverables: string[];
        timeline?: {
            milestones: {
                description: string;
                dueDate: number;
            }[];
        };
        paymentTerms: string;
    };
}>;
/**
 * Real estate lease agreement specific type.
 */
export type TLeaseContract = TContractEnvelope<"lease", {
    propertyDetails: {
        address: business.IAddress;
        propertyType: string;
        areaSize?: number;
        areaSizeUnit?: string;
    };
    leaseTerms: {
        rentAmount: number;
        rentCurrency: string;
        paymentFrequency: "monthly" | "quarterly" | "annually";
        depositAmount?: number;
        utilities?: string[];
    };
}>;
/**
 * Union type for all contract types.
 */
export type TContract = TEmploymentContract | TNDAContract | TServiceContract | TLeaseContract;
