/*
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 CellPresenterBase = /*@__PURE__*/ (() => {
    class CellPresenterBase extends Base {
        constructor(a) {
            super();
            this.a = null;
            this.a = a;
        }
        modelUpdated(a) {
            this.b(a);
        }
        b(a) {
            this.a.bo(a.c);
            this.a.bt(a.d);
            this.a.bg();
            if (a.ax(CellModel.d2) || a.ax(CellModel.d6) || a.ax(CellModel.d4) || a.ax(CellModel.d0)) {
                this.a.bv(a.d1, a.d5, a.d3, a.dz);
            }
            if (a.aq) {
                this.a.bq(a.kf, a.dp, a.du, a.ds, a.dm);
                if (a.ax(CellModel.dk)) {
                    if (!a.a1 && a.o.ha && a.a0 && a.by == 1) {
                        this.a.a6();
                    }
                }
            }
            if (a.ba) {
                this.a.br(a.e0, (a.d5 + a.dz + a.du + a.dm));
                this.a.bx(a.gg, (a.d1 + a.d3 + a.dp + a.ds));
            }
            if (a.as) {
                if (a.a4 && !this.a.n) {
                    this.a.a5();
                }
                if (a.ax(CellModel.dl)) {
                    this.a.bp(a.ke.color);
                }
                if (a.ax(CellModel.dy)) {
                    this.a.bu(a.b0);
                }
                if (a.aw("IsCollapsable")) {
                    this.a.o = a.ar;
                    this.a.ay = a.e6;
                    this.a.p = a.az;
                    this.a.bx(a.gg, (a.d1 + a.d3 + a.dp + a.ds));
                }
                if (a.aw("Indent")) {
                    this.a.ay = a.e6;
                    this.a.bx(a.gg, (a.d1 + a.d3 + a.dp + a.ds));
                }
                if (a.aw("IsExpanded")) {
                    this.a.p = a.az;
                }
            }
            if (a.ba && a.a4) {
                this.a.b5(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 false;
        }
    }
    CellPresenterBase.$t = /*@__PURE__*/ markType(CellPresenterBase, 'CellPresenterBase', Base.$, [ICellPresenter_$type]);
    return CellPresenterBase;
})();
//# sourceMappingURL=CellPresenterBase.js.map
