/*
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 { CanvasCellPresenterBase } from "./CanvasCellPresenterBase";
import { CellModel } from "./CellModel";
import { ImageCellModel } from "./ImageCellModel";
import { markType } from "igniteui-webcomponents-core";
import { stringStartsWith } from "igniteui-webcomponents-core";
/**
 * @hidden
 */
export let CanvasImageCellPresenter = /*@__PURE__*/ (() => {
    class CanvasImageCellPresenter extends CanvasCellPresenterBase {
        constructor(a) {
            super(a);
        }
        get d() {
            return this.a;
        }
        b(a) {
            super.b(a);
            let b = a;
            if (a.as) {
                if (a.ax(CellModel.ei) || a.ax(CellModel.gf)) {
                    let c = Math.min(1, Math.max(0, a.cb));
                    let d = a.b1 * (1 - c);
                    this.d.c6 = d;
                }
                if (b.ax(ImageCellModel.k0) || b.ax(ImageCellModel.k1)) {
                    this.e(b.k4, b.kx);
                }
                if (b.ax(ImageCellModel.k2) || b.ax(ImageCellModel.e2) || b.ax(ImageCellModel.ge)) {
                    this.f(b.kz, b.f, b.h);
                }
                if (b.ax(ImageCellModel.f9)) {
                    if (a.t == 1) {
                        this.d.c9();
                    }
                    else if (a.t == 2) {
                        this.e(b.k4, b.kx);
                    }
                }
            }
        }
        f(a, b, c) {
        }
        e(a, b) {
            let c = a.toLowerCase();
            if (b == 0) {
                b = 4;
            }
            if (stringStartsWith(c, "http") || b == 4) {
                this.d.db(a, 4);
            }
            if (stringStartsWith(c, "asset") || b == 2) {
                let d = a;
                if (stringStartsWith(c, "asset")) {
                    d = a.substr(8);
                }
                this.d.db(d, 2);
            }
            if (stringStartsWith(c, "drawable") || b == 1) {
                let e = a;
                if (stringStartsWith(c, "drawable")) {
                    e = a.substr(11);
                }
                this.d.db(e, 1);
            }
            if (stringStartsWith(c, "nativeresource") || b == 1) {
                let f = a;
                if (stringStartsWith(c, "nativeresource")) {
                    f = a.substr(17);
                }
                this.d.db(f, 1);
            }
            if (stringStartsWith(c, "embeddedresource") || b == 3) {
                let g = a;
                if (stringStartsWith(c, "embeddedresource")) {
                    g = a.substr(19);
                }
                this.d.db(g, 3);
            }
        }
    }
    CanvasImageCellPresenter.$t = /*@__PURE__*/ markType(CanvasImageCellPresenter, 'CanvasImageCellPresenter', CanvasCellPresenterBase.$);
    return CanvasImageCellPresenter;
})();
//# sourceMappingURL=CanvasImageCellPresenter.js.map
