/*
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 { __extends } from "tslib";
import { ErrorBarSettingsBase } from "./ErrorBarSettingsBase";
import { EnableErrorBars_$type } from "./EnableErrorBars";
import { DependencyProperty } from "igniteui-react-core";
import { IErrorBarCalculator_$type } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { Style } from "igniteui-react-core";
import { runOn, delegateCombine, enumGetBox, typeCast, delegateRemove, markType, markDep } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
/**
 * @hidden
 */
var CategoryErrorBarSettings = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CategoryErrorBarSettings, _super);
    function CategoryErrorBarSettings() {
        var _this = _super.call(this) || this;
        _this.p = null;
        _this.propertyUpdated = delegateCombine(_this.propertyUpdated, runOn(_this, _this.ab));
        return _this;
    }
    Object.defineProperty(CategoryErrorBarSettings.prototype, "q", {
        get: function () {
            return this.p;
        },
        set: function (a) {
            this.p = a;
        },
        enumerable: false,
        configurable: true
    });
    CategoryErrorBarSettings.prototype.ab = function (a, b) {
        switch (b.propertyName) {
            case CategoryErrorBarSettings.$$p[0]:
                var c = typeCast(IErrorBarCalculator_$type, b.oldValue);
                if (c != null) {
                    c.changed = delegateRemove(c.changed, runOn(this, this.aa));
                }
                if (this.q != null) {
                    this.q.pp(false);
                    if (this.q.cy != null) {
                        this.q.ol();
                    }
                }
                var d = typeCast(IErrorBarCalculator_$type, b.newValue);
                if (d != null) {
                    d.changed = delegateCombine(d.changed, runOn(this, this.aa));
                }
                break;
            case CategoryErrorBarSettings.$$p[1]:
            case CategoryErrorBarSettings.$$p[2]:
            case CategoryErrorBarSettings.$$p[3]:
            case CategoryErrorBarSettings.$$p[4]:
            case CategoryErrorBarSettings.$$p[5]:
                if (this.q != null) {
                    this.q.pp(false);
                    if (this.q.cy != null) {
                        this.q.ol();
                    }
                }
                break;
        }
    };
    CategoryErrorBarSettings.prototype.aa = function (a, b) {
        var c = typeCast(IErrorBarCalculator_$type, a);
        if (c != null) {
            c.changed = delegateRemove(c.changed, runOn(this, this.aa));
            if (this.q != null) {
                this.q.pp(false);
            }
            c.changed = delegateCombine(c.changed, runOn(this, this.aa));
        }
    };
    CategoryErrorBarSettings.$t = markType(CategoryErrorBarSettings, 'CategoryErrorBarSettings', ErrorBarSettingsBase.$);
    CategoryErrorBarSettings.$$p = markDep(DependencyProperty, PropertyMetadata, CategoryErrorBarSettings, 'l', ['Calculator:r:ac', [IErrorBarCalculator_$type, null], 'EnableErrorBars:o:ad', [EnableErrorBars_$type, enumGetBox(EnableErrorBars_$type, 0)], 'ErrorBarCapLength:t:ae', [1, 6], 'ErrorBarStyle:aj:af', [Style.$, null], 'Stroke:ai:ag', [Brush.$, null], 'StrokeThickness:s:ah', [1, 1]]);
    return CategoryErrorBarSettings;
}(ErrorBarSettingsBase));
export { CategoryErrorBarSettings };
