/*
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 { PathGeometry } from "./PathGeometry";
import { List$1 } from "./List$1";
import { PathFigure } from "./PathFigure";
import { Panel } from "./Panel";
import { ContentControl } from "./ContentControl";
import { Base, typeCast, fromEnum, markType } from "./type";
import { UIElement } from "./UIElement";
import { isNaN_, isInfinity } from "./number";
var Extensions = /** @class */ (function (_super) {
    tslib_1.__extends(Extensions, _super);
    function Extensions() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Extensions.e = function (a) {
        a.b.clear();
        a.b.add(new PathFigure());
        a.b.removeAt(0);
    };
    Extensions.d = function (a) {
        a.c.clear();
        a.c.add(new PathGeometry());
        a.c.removeAt(0);
    };
    Extensions.c = function (a) {
        if (a == null) {
            return;
        }
        var b = typeCast(Panel.$, a.x);
        if (b != null) {
            b.ab.remove(a);
            return;
        }
        var c = typeCast(ContentControl.$, a.x);
        if (c != null) {
            c.content = null;
            return;
        }
    };
    Extensions.f = function (a, b) {
        var c = new List$1(UIElement.$, 0);
        try {
            for (var _a = tslib_1.__values(fromEnum(a.ab)), _b = _a.next(); !_b.done; _b = _a.next()) {
                var d = _b.value;
                if (typeCast(UIElement.$, d) !== null) {
                    c.add(d);
                }
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
            }
            finally { if (e_1) throw e_1.error; }
        }
        try {
            for (var _d = tslib_1.__values(fromEnum(c)), _e = _d.next(); !_e.done; _e = _d.next()) {
                var e = _e.value;
                a.ab.remove(e);
                b.ab.add(e);
            }
        }
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
        finally {
            try {
                if (_e && !_e.done && (_f = _d.return)) _f.call(_d);
            }
            finally { if (e_2) throw e_2.error; }
        }
        var e_1, _c, e_2, _f;
    };
    Extensions.a = function (a) {
        return !isNaN_(a.x) && !isNaN_(a.y) && !isInfinity(a.x) && !isInfinity(a.y);
    };
    Extensions.b = function (a) {
        return !isNaN_(a.left) && !isNaN_(a.right) && !isNaN_(a.top) && !isNaN_(a.bottom) && !isInfinity(a.left) && !isInfinity(a.right) && !isInfinity(a.top) && !isInfinity(a.bottom);
    };
    Extensions.$t = markType(Extensions, 'Extensions');
    return Extensions;
}(Base));
export { Extensions };
//# sourceMappingURL=Extensions.js.map