import type { Material } from './types';
export declare function materialsApproximatelyEqual(a: Material, b: Material): boolean;
export declare function materialFingerprint(material: Material): string;
export interface MaterialMergeResult {
    additions: Material[];
    rewrites: Map<string, string>;
}
export declare function mergeMaterials(existingMaterials: readonly Material[], incomingMaterials: readonly Material[]): MaterialMergeResult;
interface PaletteCarrier {
    palette?: ReadonlyArray<string> | null;
}
export declare function collectPaletteIds(primitives: Iterable<PaletteCarrier>): Set<string>;
export declare function cloneMaterialsByPalette(materials: readonly Material[], paletteIds: Set<string>): Material[];
export interface MaterialEnsurerOptions {
    prefix?: string;
}
export interface MaterialEnsurer {
    ensure(color: {
        r: number;
        g: number;
        b: number;
        a: number;
    }): string;
}
export declare function createMaterialEnsurer(materials: Material[], options?: MaterialEnsurerOptions): MaterialEnsurer;
export {};
