/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends } from "tslib";
import { Base, typeCast, markType } from "igniteui-angular-core";
import { PatternFillInfo } from "./PatternFillInfo";
import { GradientFillInfo } from "./GradientFillInfo";
import { CellFillPattern } from "./CellFillPattern";
import { CellFillGradient } from "./CellFillGradient";
/**
 * @hidden
 */
var FillInfo = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FillInfo, _super);
    function FillInfo() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.e = null;
        _this.c = null;
        return _this;
    }
    FillInfo.prototype.equals = function (a) {
        if (Base.referenceEquals(this, a)) {
            return true;
        }
        var b = typeCast(FillInfo.$, a);
        if (b == null) {
            return false;
        }
        return Base.equalsStatic(this.e, b.e) && Base.equalsStatic(this.c, b.c);
    };
    FillInfo.prototype.getHashCode = function () {
        var a = 0;
        if (this.e != null) {
            a ^= this.e.getHashCode();
        }
        if (this.c != null) {
            a ^= this.c.getHashCode();
        }
        return a;
    };
    Object.defineProperty(FillInfo.prototype, "d", {
        get: function () {
            return this.e;
        },
        set: function (a) {
            this.e = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FillInfo.prototype, "b", {
        get: function () {
            return this.c;
        },
        set: function (a) {
            this.c = a;
        },
        enumerable: false,
        configurable: true
    });
    FillInfo.prototype.h = function (a, b) {
        if (this.d != null) {
            a.fill = this.d.a(b, a);
        }
        else if (this.b != null) {
            a.fill = this.b.a(b);
        }
        else {
        }
    };
    FillInfo.a = function (a, b) {
        var c = new FillInfo();
        var d = b._ar;
        var e = typeCast(CellFillPattern.$, d);
        if (e != null) {
            c.d = PatternFillInfo.f(a, b, e);
        }
        else {
            var f = typeCast(CellFillGradient.$, d);
            if (f != null) {
                c.b = GradientFillInfo.b(a, f);
            }
            else {
            }
        }
        return c;
    };
    FillInfo.$t = markType(FillInfo, 'FillInfo');
    return FillInfo;
}(Base));
export { FillInfo };
