/*
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-react-core/ES5/type";
import { Brush } from "igniteui-react-core/ES5/Brush";
import { BrushUtil } from "igniteui-react-core/ES5/BrushUtil";
/**
 * @hidden
 */
var FrameExtended = /** @class */ (function (_super) {
    tslib_1.__extends(FrameExtended, _super);
    function FrameExtended() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    FrameExtended.b = function (a, b, c, d) {
        var e = BrushUtil.g(b, a, c, d);
        return e;
    };
    FrameExtended.a = function (a, b, c, d, e) {
        var f = c.count;
        var g = d.count;
        var h = Math.max(f, g);
        var i = ((function () {
            var $ret = new Brush();
            $ret.fill = "transparent";
            return $ret;
        })());
        var j = 1 - b;
        if (a.count < h) {
            var k = new Array(h - a.count);
            for (var l = 0; l < h - a.count; l++) {
                k[l] = new Brush();
            }
            a.s(a.count, k);
        }
        if (a.count > h) {
            a.v(h, a.count - h);
        }
        for (var m = 0; m < Math.min(f, g); ++m) {
            a._inner[m] = FrameExtended.b(b, c._inner[m], d._inner[m], e);
        }
        if (f < g) {
            var n = f > 0 ? c._inner[f - 1] : i;
            for (var o = f; o < g; ++o) {
                a._inner[o] = FrameExtended.b(b, n, d._inner[o], e);
            }
        }
        if (f > g) {
            var p = g > 0 ? d._inner[g - 1] : i;
            for (var q = g; q < f; ++q) {
                a._inner[q] = FrameExtended.b(b, c._inner[q], p, e);
            }
        }
    };
    FrameExtended.$t = markType(FrameExtended, 'FrameExtended');
    return FrameExtended;
}(Base));
export { FrameExtended };
