export function createRendererOwnedEvidenceFlag(input) {
    return {
        id: input.id,
        feature: input.feature,
        label: input.label,
        source: input.source ?? "renderer-scene",
        rendererOwned: true,
        sceneContent: input.sceneContent ?? true,
        domOverlay: false,
        satisfiesPublicCinematicGate: true,
        diagnostics: input.diagnostics ?? []
    };
}
export function createDomOverlayEvidenceFlag(input) {
    return {
        id: input.id,
        feature: input.feature,
        label: input.label,
        source: input.source ?? "dom-overlay",
        rendererOwned: false,
        sceneContent: false,
        domOverlay: true,
        satisfiesPublicCinematicGate: false,
        diagnostics: input.diagnostics ?? ["DOM/CSS overlays are diagnostic UI only and do not satisfy public cinematic scene evidence."]
    };
}
export function validateRendererOwnedCinematicEvidence(flags, requiredFeatures) {
    const rendererOwnedFeatures = unique(flags.filter((flag) => flag.rendererOwned && flag.satisfiesPublicCinematicGate).map((flag) => flag.feature));
    const overlayOnlyFeatures = requiredFeatures.filter((feature) => {
        const featureFlags = flags.filter((flag) => flag.feature === feature);
        return featureFlags.length > 0 && featureFlags.every((flag) => flag.domOverlay || !flag.rendererOwned);
    });
    const missingRendererOwnedFeatures = requiredFeatures.filter((feature) => !rendererOwnedFeatures.includes(feature));
    if (missingRendererOwnedFeatures.length > 0 || overlayOnlyFeatures.length > 0) {
        return {
            ok: false,
            code: "AURA_CINEMATIC_DOM_OVERLAY_EVIDENCE_REJECTED",
            missingRendererOwnedFeatures,
            overlayOnlyFeatures,
            diagnostics: [
                "Required cinematic proof must come from renderer-owned scene, material, lighting, VFX, postprocess, camera, timeline, or blocking data.",
                ...overlayOnlyFeatures.map((feature) => `${feature} was represented only by DOM/CSS overlay evidence.`)
            ]
        };
    }
    return {
        ok: true,
        rendererOwnedFeatures,
        diagnostics: ["All required cinematic evidence features are renderer-owned."]
    };
}
function unique(values) {
    return [...new Set(values)];
}
//# sourceMappingURL=CinematicEvidence.js.map