/*
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 * as tslib_1 from "tslib";
import { Base, markType } from "igniteui-webcomponents-core";
import { ICellPresenter_$type } from "./ICellPresenter";
import { CellModel } from "./CellModel";
import { BrushUtil } from "igniteui-webcomponents-core";
/**
 * @hidden
 */
var CanvasCellPresenterBase = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(CanvasCellPresenterBase, _super);
    function CanvasCellPresenterBase(a) {
        var _this = _super.call(this) || this;
        _this.a = null;
        _this.a = a;
        return _this;
    }
    CanvasCellPresenterBase.prototype.modelUpdated = function (a) {
        this.b(a);
    };
    CanvasCellPresenterBase.prototype.b = function (a) {
        this.a.b8(a.c);
        if (a.ax(CellModel.d2) || a.ax(CellModel.d6) || a.ax(CellModel.d4) || a.ax(CellModel.d0)) {
            this.a.cg(a.d1, a.d5, a.d3, a.dz);
        }
        if (a.aq) {
            this.a.ca(a.kf, a.dp, a.du, a.ds, a.dm);
        }
        if (a.ba) {
            this.a.cd(a.e0);
            this.a.cn(a.gg);
        }
        if (a.as) {
            if (a.a4 && !this.a.u) {
                this.a.by();
            }
            if (a.ax(CellModel.dl)) {
                this.a.b9(a.ke.color);
            }
            if (a.ax(CellModel.dy)) {
                this.a.cf(a.b0);
            }
        }
        if (a.ba && a.a4) {
            this.a.cq(a);
        }
    };
    CanvasCellPresenterBase.prototype.c = function (a, b, c) {
        if (c == 0) {
            return a.color;
        }
        if (c == 1) {
            return b.color;
        }
        var d = BrushUtil.k(a, c, b, 0);
        return d.color;
    };
    Object.defineProperty(CanvasCellPresenterBase.prototype, "nativeCell", {
        get: function () {
            return this.a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CanvasCellPresenterBase.prototype, "isCanvasBased", {
        get: function () {
            return true;
        },
        enumerable: true,
        configurable: true
    });
    CanvasCellPresenterBase.$t = markType(CanvasCellPresenterBase, 'CanvasCellPresenterBase', Base.$, [ICellPresenter_$type]);
    return CanvasCellPresenterBase;
}(Base));
export { CanvasCellPresenterBase };
//# sourceMappingURL=CanvasCellPresenterBase.js.map
