import type { AppliedDataSemantic } from '../Semantics.js';
import { SemanticType } from '../Semantics.js';
/**
 * Supported storage formats for monetary values.
 */
export type CurrencyStorageFormat = 'decimal' | 'integer_cents' | 'complex_object';
/**
 * Configuration options for the Currency semantic.
 * Controls monetary value storage, validation, currency handling, and precision.
 */
export interface CurrencyConfig {
    /**
     * How the monetary value is stored in the database.
     *
     * - 'decimal': Store as DECIMAL/NUMERIC type (e.g., 19.99)
     * - 'integer_cents': Store as INTEGER in smallest currency unit (e.g., 1999 for $19.99)
     * - 'complex_object': Store as JSON/JSONB with amount and currency (e.g., {"amount": 1999, "currency": "USD"})
     */
    storageFormat?: CurrencyStorageFormat;
    /**
     * Default currency code (ISO 4217) when not specified.
     * Required when using 'decimal' or 'integer_cents' format.
     */
    defaultCurrency?: string;
    /**
     * List of allowed currency codes (ISO 4217).
     * If not specified, all valid ISO 4217 currencies are allowed.
     */
    allowedCurrencies?: string[];
    /**
     * Number of decimal places for precision.
     * Default: 2 (for most currencies like USD, EUR)
     * Some currencies may need 0 (JPY, KRW) or 3 (BHD, KWD)
     */
    decimalPlaces?: number;
    /**
     * Whether negative values are allowed (for refunds, discounts, etc.).
     */
    allowNegative?: boolean;
    /**
     * Whether to automatically validate currency codes against ISO 4217.
     */
    validateCurrencyCode?: boolean;
    /**
     * Custom metadata for the currency field.
     */
    metadata?: Record<string, unknown>;
    /**
     * Index signature to allow additional properties.
     */
    [key: string]: unknown;
}
/**
 * Type-safe configuration for Currency semantic.
 */
export interface AppliedCurrencySemantic extends AppliedDataSemantic {
    id: SemanticType.Currency;
    config?: CurrencyConfig;
}
/**
 * Type guard to check if a semantic is a Currency semantic.
 */
export declare const isCurrencySemantic: (semantic: AppliedDataSemantic) => semantic is AppliedCurrencySemantic;
/**
 * Helper function to create a Currency semantic with configuration.
 */
export declare const createCurrencySemantic: (config?: CurrencyConfig) => AppliedCurrencySemantic;
/**
 * Default configuration for Currency semantic.
 * Optimized for common e-commerce use cases with USD currency.
 */
export declare const DEFAULT_CURRENCY_CONFIG: CurrencyConfig;
/**
 * Predefined configurations for common use cases.
 */
export declare const CURRENCY_PRESETS: {
    /**
     * Simple USD decimal storage - good for most e-commerce sites.
     */
    readonly USD_DECIMAL: AppliedCurrencySemantic;
    /**
     * Integer cents storage - avoids floating point issues, good for financial calculations.
     */
    readonly USD_CENTS: AppliedCurrencySemantic;
    /**
     * Multi-currency support with complex object storage.
     */
    readonly MULTI_CURRENCY: AppliedCurrencySemantic;
    /**
     * Configuration that allows negative values for refunds, discounts, etc.
     */
    readonly WITH_NEGATIVES: AppliedCurrencySemantic;
    /**
     * High-precision configuration for cryptocurrency or precious metals.
     */
    readonly HIGH_PRECISION: AppliedCurrencySemantic;
};
/**
 * Helper function to validate a currency configuration.
 */
export declare const validateCurrencyConfig: (config: CurrencyConfig) => string[];
//# sourceMappingURL=Currency.d.ts.map