/*
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 { Base, markType } from "igniteui-webcomponents-core";
import { ICellPresenter_$type } from "./ICellPresenter";
import { CellModel } from "./CellModel";
import { BrushUtil } from "igniteui-webcomponents-core";
/**
 * @hidden
 */
export let CanvasCellPresenterBase = /*@__PURE__*/ (() => {
    class CanvasCellPresenterBase extends Base {
        constructor(a) {
            super();
            this.a = null;
            this.a = a;
        }
        modelUpdated(a) {
            this.b(a);
        }
        b(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);
            }
        }
        c(a, b, c) {
            if (c == 0) {
                return a.color;
            }
            if (c == 1) {
                return b.color;
            }
            let d = BrushUtil.k(a, c, b, 0);
            return d.color;
        }
        get nativeCell() {
            return this.a;
        }
        get isCanvasBased() {
            return true;
        }
    }
    CanvasCellPresenterBase.$t = /*@__PURE__*/ markType(CanvasCellPresenterBase, 'CanvasCellPresenterBase', Base.$, [ICellPresenter_$type]);
    return CanvasCellPresenterBase;
})();
//# sourceMappingURL=CanvasCellPresenterBase.js.map
