"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module DisplayStyles
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.WhiteOnWhiteReversalSettings = void 0;
/** As part of a [[DisplayStyleSettings]], controls how white-on-white reversal is applied to make white geometry more
 * visible in the view.
 * By default, pure white geometry is displayed as black instead if the [[DisplayStyleSettings.backgroundColor]] is also pure white.
 * These settings are only applied if the display style's [[ViewFlags.whiteOnWhiteReversal]] flag is enabled.
 * @see [[DisplayStyleSettings.whiteOnWhiteReversal]] to change these settings for a display style.
 * @public
 */
class WhiteOnWhiteReversalSettings {
    constructor(ignoreBackground) {
        this.ignoreBackgroundColor = ignoreBackground;
    }
    /** Create from JSON representation. */
    static fromJSON(props) {
        return props?.ignoreBackgroundColor ? this._noIgnore : this._ignore;
    }
    /** Convert to JSON representation. The JSON representation is `undefined` if these settings match the defaults. */
    toJSON() {
        return this.ignoreBackgroundColor ? { ignoreBackgroundColor: true } : undefined;
    }
    /** Returns true if `this` is equivalent to `other`. */
    equals(other) {
        return this === other;
    }
}
exports.WhiteOnWhiteReversalSettings = WhiteOnWhiteReversalSettings;
WhiteOnWhiteReversalSettings._noIgnore = new WhiteOnWhiteReversalSettings(true);
WhiteOnWhiteReversalSettings._ignore = new WhiteOnWhiteReversalSettings(false);
//# sourceMappingURL=WhiteOnWhiteReversalSettings.js.map