import { existsSync, statSync } from "node:fs";
import { resolve } from "node:path";
export function createThreeCompatFileLoaderDiagnostic(loader, uri, options = {}) {
    const path = resolve(uri);
    const exists = existsSync(path);
    const bytes = exists ? statSync(path).size : 0;
    return {
        loader,
        uri,
        status: exists ? options.status ?? "loaded" : "missing",
        bytes,
        warnings: options.warnings ?? [],
        unsupportedExtensions: options.unsupportedExtensions ?? [],
        decoderNeeds: options.decoderNeeds ?? [],
        memoryEstimateBytes: bytes * 2
    };
}
//# sourceMappingURL=LoaderDiagnostics.js.map