/*
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, runOn, delegateRemove, delegateCombine, markType } from "igniteui-webcomponents-core";
import { MinSummaryCalculator } from "igniteui-webcomponents-core";
import { MaxSummaryCalculator } from "igniteui-webcomponents-core";
import { SumSummaryCalculator } from "igniteui-webcomponents-core";
import { AverageSummaryCalculator } from "igniteui-webcomponents-core";
import { CountSummaryCalculator } from "igniteui-webcomponents-core";
import { BindingFormatter } from "igniteui-webcomponents-core";
import { FormatSummaryTextEventArgs } from "./FormatSummaryTextEventArgs";
/**
 * @hidden
 */
export let ColumnSummaryDescription = /*@__PURE__*/ (() => {
    class ColumnSummaryDescription extends Base {
        constructor(a, ..._rest) {
            super();
            this.r = false;
            this.g = 0;
            this.aa = null;
            this.m = 0;
            this.i = null;
            this.x = null;
            this.z = null;
            this.ab = null;
            this.b = null;
            this.y = null;
            this.a = null;
            this.f = null;
            this.e = null;
            this.v = null;
            this.s = 10;
            this.formatText = null;
            this.provideCalculator = null;
            this.k = null;
            a = (a == void 0) ? 0 : a;
            switch (a) {
                case 0: break;
                case 1:
                    {
                        let c = _rest[0];
                        this.af = c;
                        this.n = 4;
                    }
                    break;
                case 2:
                    {
                        let c = _rest[0];
                        let d = _rest[1];
                        this.af = c;
                        this.n = d;
                    }
                    break;
            }
        }
        get af() {
            return this.aa;
        }
        set af(a) {
            this.aa = a;
        }
        get n() {
            return this.m;
        }
        set n(a) {
            this.m = a;
            switch (this.m) {
                case 0:
                    this.j = new MinSummaryCalculator();
                    break;
                case 1:
                    this.j = new MaxSummaryCalculator();
                    break;
                case 2:
                    this.j = new SumSummaryCalculator();
                    break;
                case 3:
                    this.j = new AverageSummaryCalculator();
                    break;
                case 4:
                    this.j = new CountSummaryCalculator();
                    break;
            }
        }
        get j() {
            return this.i;
        }
        set j(a) {
            this.i = a;
        }
        get ac() {
            return this.x;
        }
        set ac(a) {
            this.x = a;
        }
        get ae() {
            return this.z;
        }
        set ae(a) {
            this.z = a;
        }
        get ag() {
            return this.ab;
        }
        set ag(a) {
            this.ab = a;
            this.ah();
        }
        get d() {
            return this.b;
        }
        set d(a) {
            this.b = a;
            this.ah();
        }
        get ad() {
            return this.y;
        }
        set ad(a) {
            this.y = a;
            this.ah();
        }
        get c() {
            return this.a;
        }
        set c(a) {
            this.a = a;
            this.ah();
        }
        ah() {
            if (this.ag != null) {
                this.f = new BindingFormatter();
                this.f.j = this.ag;
                this.f.d = this.d;
            }
            else {
                this.f = null;
            }
            if (this.ad != null) {
                this.e = new BindingFormatter();
                this.e.j = this.ad;
                this.e.d = this.c;
            }
            else {
                this.e = null;
            }
        }
        get w() {
            return this.v;
        }
        set w(a) {
            this.v = a;
        }
        get u() {
            return this.s;
        }
        set u(a) {
            this.s = a;
        }
        equals(a) {
            let b = a;
            if (b == null) {
                return super.equals(a);
            }
            return b.af == this.af && b.n == this.n;
        }
        getHashCode() {
            return Base.getHashCodeStatic(this.af) * 17 + this.n;
        }
        o(a, b, c) {
            let d = ((() => {
                let $ret = new FormatSummaryTextEventArgs();
                $ret.c = this.af;
                $ret.b = this.ae;
                $ret.a = a;
                $ret.d = b;
                $ret.e = c;
                return $ret;
            })());
            if (this.formatText != null) {
                this.formatText(this, d);
            }
            return d;
        }
        get l() {
            return this.k;
        }
        set l(a) {
            let b = this.k;
            if (b != null) {
                b.provideCalculator = delegateRemove(b.provideCalculator, runOn(this, this.ai));
            }
            this.k = a;
            if (this.k != null) {
                let c = this.k;
                c.provideCalculator = delegateCombine(c.provideCalculator, runOn(this, this.ai));
            }
        }
        ai(a, b) {
            if (this.provideCalculator != null) {
                this.provideCalculator(this, b);
                this.j = b.a;
            }
        }
    }
    ColumnSummaryDescription.$t = /*@__PURE__*/ markType(ColumnSummaryDescription, 'ColumnSummaryDescription');
    return ColumnSummaryDescription;
})();
//# sourceMappingURL=ColumnSummaryDescription.js.map
