import { SupportedPlatforms } from './component';
/**
 * Platform utility for component stores
 *
 * This utility provides shared functionality for:
 * - Platform detection from filenames
 * - Component filename parsing (both OS-specific and OS-agnostic)
 * - Current platform detection
 * - Component matching logic
 * - Version parsing with build timestamp support
 *
 * Supports component naming patterns:
 * 1. OS-specific with platform-arch: <name>-<version>-<platform>-<arch>.ext (e.g., iocd-v10.0.1-build.123-win32-x64.zip)
 * 2. OS-specific platform only: <name>-<version>-<platform>.ext (e.g., bbgv2-v2.0.0.1-win32.zip)
 * 3. OS-agnostic: <name>-<version>.ext (e.g., webapp-v10.0.0-build.123.zip)
 *
 * Version formats supported:
 * - v<X.Y.Z> (e.g., v10.0.0)
 * - v<X.Y.Z>-build.<TIMESTAMP> (e.g., v10.0.0-build.20250927121929)
 * - v<X.Y.Z.B> (e.g., v10.0.0.1)
 */
export interface ComponentFilenameInfo {
    name: string;
    version: string;
    baseVersion: string;
    buildInfo?: string;
    buildNumber?: number | undefined;
    isOsSpecific: boolean;
    platform?: SupportedPlatforms;
    arch?: string;
}
/**
 * Platform utility for component stores
 *
 * This utility provides shared functionality for:
 * - Platform detection from filenames
 * - Component filename parsing (both OS-specific and OS-agnostic)
 * - Current platform detection
 * - Component matching logic
 * - Version parsing with build timestamp support
 *
 * Supports component naming patterns:
 * 1. OS-specific: <name>-<version>-<arch>-<platform>.ext (e.g., iocd-v10.0.0-build.123-darwin-arm64.dmg)
 * 2. OS-agnostic: <name>-<version>.ext (e.g., webapp-v10.0.0-build.123.zip)
 *
 * Version formats supported:
 * - v<X.Y.Z> (e.g., v10.0.0)
 * - v<X.Y.Z>-build.<TIMESTAMP> (e.g., v10.0.0-build.20250927121929)
 * - v<X.Y.Z.B> (e.g., v10.0.0.1)
 */
export declare class ComponentPlatformUtils {
    /**
     * Get current platform string compatible with component naming
     */
    static getCurrentPlatform(): SupportedPlatforms;
    /**
     * Parse component information from filename
     *
     * Supports component patterns:
     * - OS-specific: <component>-<version>-<arch>-<platform>.<ext>
     * - OS-agnostic: <component>-<version>.<ext>
     *
     * @param filename The component filename to parse
     * @returns Parsed component info
     * @throws Error if parsing fails
     */
    static parseComponentFilename(filename: string): ComponentFilenameInfo;
    /**
     * Parse component information from a name (not filename)
     *
     * Supports component patterns:
     * - OS-specific with platform-arch: <component>-<version>-<platform>-<arch>
     * - OS-specific with platform only: <component>-<version>-<platform>
     * - OS-agnostic: <component>-<version>
     *
     * @param name The component name to parse
     * @returns Parsed component info
     * @throws Error if parsing fails
     */
    static parseComponentName(name: string): ComponentFilenameInfo;
    /**
     * Check if a filename matches the current platform
     *
     * @param filename The filename to check
     * @param currentPlatform Optional current platform (defaults to auto-detect)
     * @returns True if the component matches the current platform
     */
    static matchesCurrentPlatform(filename: string, currentPlatform?: SupportedPlatforms): boolean;
    /**
     * Check if a file is a supported package format
     */
    static isSupportedPackageFile(filename: string): boolean;
    /**
     * Parse version string to extract base version and build information
     *
     * @param version Version string (e.g., "v10.0.0-build.20250927121929")
     * @returns Parsed version info
     */
    static parseVersionString(version: string): {
        baseVersion: string;
        buildInfo?: string;
        buildNumber?: number;
        timestamp?: string;
    };
    /**
     * Parse platform part to extract platform and architecture
     *
     * @param platformPart Platform string (e.g., "darwin-arm64", "win32", "darwin")
     * @returns Parsed platform info
     */
    static parsePlatformPart(platformPart: string): {
        platform: SupportedPlatforms;
        arch?: string;
    };
    /**
     * Normalize version string by removing build suffix
     *
     * @param version Version string
     * @returns Base version without build info
     */
    static normalizeVersion(version: string): string;
    /**
     * Compare two version strings with build timestamp support
     * Priority: non-build > newer build > older build
     *
     * @param a First version string
     * @param b Second version string
     * @returns -1 if a < b, 1 if a > b, 0 if equal
     */
    static compareVersionsWithBuild(a: string, b: string): number;
    /**
     * Compare semantic version strings (X.Y.Z or X.Y.Z.B)
     *
     * @param a First version
     * @param b Second version
     * @returns -1 if a < b, 1 if a > b, 0 if equal
     */
    static compareSemanticVersions(a: string, b: string): number;
    /**
     * Compare two version strings for sorting (backwards compatibility)
     * For new build-aware comparison, use compareVersionsWithBuild()
     *
     * @param a First version string
     * @param b Second version string
     * @returns -1 if a < b, 1 if a > b, 0 if equal
     */
    static compareVersions(a: string, b: string): number;
}
//# sourceMappingURL=platform.utils.d.ts.map