/**
 * Base Specification Implementation
 *
 * This module provides the abstract base class for specifications,
 * implementing the composition methods (and/or/not) while leaving
 * the core validation logic to subclasses.
 *
 * @module declarative-api/specification
 */
import type { ISpecification, ValidationError } from '../../../lib/runtime-web/types/declarative-api/specification.types';
/**
 * Abstract base class for specifications.
 *
 * Provides default implementations for composition methods (and/or/not)
 * while requiring subclasses to implement the core validation logic.
 *
 * @typeParam T - The type of candidate being validated
 *
 * @example
 * ```typescript
 * class MinLengthSpec extends BaseSpecification<string> {
 *   constructor(private readonly minLength: number) {
 *     super();
 *   }
 *
 *   isSatisfiedBy(candidate: string): boolean {
 *     return candidate.length >= this.minLength;
 *   }
 *
 *   getErrors(candidate: string): ValidationError[] {
 *     if (this.isSatisfiedBy(candidate)) {
 *       return [];
 *     }
 *     return [{
 *       path: '',
 *       message: `String must be at least ${this.minLength} characters`,
 *       code: 'MIN_LENGTH',
 *       severity: 'error',
 *     }];
 *   }
 * }
 * ```
 *
 * Validates: Requirements 11.1
 */
export declare abstract class BaseSpecification<T> implements ISpecification<T> {
    /**
     * Check if the specification is satisfied by the candidate.
     *
     * Subclasses must implement this method with their validation logic.
     *
     * @param candidate - The value to check
     * @returns True if the specification is satisfied
     */
    abstract isSatisfiedBy(candidate: T): boolean;
    /**
     * Get validation errors for the candidate.
     *
     * Subclasses must implement this method to return detailed errors.
     *
     * @param candidate - The value to validate
     * @returns Array of validation errors (empty if valid)
     */
    abstract getErrors(candidate: T): ValidationError[];
    /**
     * Create a new specification that is satisfied when both
     * this specification AND the other specification are satisfied.
     *
     * @param other - The specification to combine with
     * @returns A new AndSpecification
     */
    and(other: ISpecification<T>): ISpecification<T>;
    /**
     * Create a new specification that is satisfied when either
     * this specification OR the other specification is satisfied.
     *
     * @param other - The specification to combine with
     * @returns A new OrSpecification
     */
    or(other: ISpecification<T>): ISpecification<T>;
    /**
     * Create a new specification that is satisfied when
     * this specification is NOT satisfied.
     *
     * @returns A new NotSpecification
     */
    not(): ISpecification<T>;
}
/**
 * Specification that is satisfied when BOTH specifications are satisfied.
 *
 * Implements logical AND composition. Errors from both specifications
 * are collected when validation fails.
 *
 * @typeParam T - The type of candidate being validated
 *
 * Validates: Requirements 11.2
 */
export declare class AndSpecification<T> extends BaseSpecification<T> {
    private readonly left;
    private readonly right;
    /**
     * Create an AND specification from two specifications.
     *
     * @param left - The first specification
     * @param right - The second specification
     */
    constructor(left: ISpecification<T>, right: ISpecification<T>);
    /**
     * Check if both specifications are satisfied.
     *
     * @param candidate - The value to check
     * @returns True if both specifications are satisfied
     */
    isSatisfiedBy(candidate: T): boolean;
    /**
     * Get errors from both specifications.
     *
     * @param candidate - The value to validate
     * @returns Combined errors from both specifications
     */
    getErrors(candidate: T): ValidationError[];
}
/**
 * Specification that is satisfied when EITHER specification is satisfied.
 *
 * Implements logical OR composition. Errors are only returned when
 * both specifications fail.
 *
 * @typeParam T - The type of candidate being validated
 *
 * Validates: Requirements 11.2
 */
export declare class OrSpecification<T> extends BaseSpecification<T> {
    private readonly left;
    private readonly right;
    /**
     * Create an OR specification from two specifications.
     *
     * @param left - The first specification
     * @param right - The second specification
     */
    constructor(left: ISpecification<T>, right: ISpecification<T>);
    /**
     * Check if either specification is satisfied.
     *
     * @param candidate - The value to check
     * @returns True if at least one specification is satisfied
     */
    isSatisfiedBy(candidate: T): boolean;
    /**
     * Get errors only when both specifications fail.
     *
     * When at least one specification passes, returns empty array.
     * When both fail, returns errors from both.
     *
     * @param candidate - The value to validate
     * @returns Combined errors when both fail, empty otherwise
     */
    getErrors(candidate: T): ValidationError[];
}
/**
 * Specification that is satisfied when the wrapped specification is NOT satisfied.
 *
 * Implements logical NOT composition. The error message indicates
 * that the condition should NOT have been met.
 *
 * @typeParam T - The type of candidate being validated
 *
 * Validates: Requirements 11.2
 */
export declare class NotSpecification<T> extends BaseSpecification<T> {
    private readonly spec;
    /**
     * Create a NOT specification from a specification.
     *
     * @param spec - The specification to negate
     */
    constructor(spec: ISpecification<T>);
    /**
     * Check if the wrapped specification is NOT satisfied.
     *
     * @param candidate - The value to check
     * @returns True if the wrapped specification is NOT satisfied
     */
    isSatisfiedBy(candidate: T): boolean;
    /**
     * Get error when the wrapped specification IS satisfied.
     *
     * @param candidate - The value to validate
     * @returns Error indicating condition should not have been met
     */
    getErrors(candidate: T): ValidationError[];
}
