/*
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 { Color } from "igniteui-webcomponents-core";
import { CellModel } from "./CellModel";
import { FontUtil } from "igniteui-webcomponents-core";
/**
 * @hidden
 */
var CanvasContentCellModelHelper = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(CanvasContentCellModelHelper, _super);
    function CanvasContentCellModelHelper() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    CanvasContentCellModelHelper.e = function (a) {
        if (a == null) {
            return CanvasContentCellModelHelper.d;
        }
        return a.color;
    };
    CanvasContentCellModelHelper.a = function (a, b, c) {
        if (b.as) {
            if (b.ax(CellModel.ei) || b.ax(CellModel.dw) || b.ax(CellModel.gf) || b.aw("IsRowPinned") || b.aw("IsRowSticky") || b.aw("PinnedRowOpacity")) {
                var d = Math.min(1, Math.max(0, b.cb));
                var e = b.bz * (1 - d);
                c.cb(e);
                if (b.a4) {
                    c.cr(b.bz * d);
                }
            }
            if (b.ax(CellModel.d7)) {
                CanvasContentCellModelHelper.c(c, b.kg);
                if (b.a4) {
                    c.cp(b.kg);
                }
            }
            if (b.ax(CellModel.fj)) {
            }
            if (b.ax(CellModel.e2) || b.ax(CellModel.ge)) {
                var f = b.f;
                var g = b.h;
                c.ce(f);
                c.cm(g);
                if (b.a4) {
                    c.co(f, g);
                }
            }
            if (b.aw("ActualFontInfo")) {
                CanvasContentCellModelHelper.b(a, c, b.af);
            }
            if (b.aw("IsEdited") || b.aw("IsDeleted")) {
                if (b.ay || b.av) {
                    if (b.av) {
                        c.cj(true);
                    }
                    else {
                        c.cj(false);
                    }
                }
                else {
                    c.cj(false);
                }
            }
        }
    };
    CanvasContentCellModelHelper.b = function (a, b, c) {
        if (c == null) {
            c = FontUtil.getDefaultFont(a);
        }
        b.cc(c);
    };
    CanvasContentCellModelHelper.c = function (a, b) {
        var c = CanvasContentCellModelHelper.e(b);
        a.cl(c);
    };
    CanvasContentCellModelHelper.$t = markType(CanvasContentCellModelHelper, 'CanvasContentCellModelHelper');
    CanvasContentCellModelHelper.d = Color.u(0, 0, 0, 0);
    return CanvasContentCellModelHelper;
}(Base));
export { CanvasContentCellModelHelper };
//# sourceMappingURL=CanvasContentCellModelHelper.js.map
