/*
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, markType } from "igniteui-angular-core";
import { SyncableObservableCollection$2 } from "igniteui-angular-core";
import { ChartSummaryDescription } from "./ChartSummaryDescription";
import { SummaryDescription } from "igniteui-angular-core";
/**
 * @hidden
 */
export let ChartSummaryDescriptionCollection = /*@__PURE__*/ (() => {
    class ChartSummaryDescriptionCollection extends Base {
        constructor() {
            super();
            this.f = new SyncableObservableCollection$2(ChartSummaryDescription.$, SummaryDescription.$, 0);
            this.d = null;
            let a = this.f;
            a.compare = (b, c) => b.p == c.propertyName && b.c == c.operand && b.f == c.calculator && b.n == c.alias && b.h == c;
            a.createFrom = (b) => {
                let c = new ChartSummaryDescription(1, b.propertyName);
                c.c = b.operand;
                c.f = b.calculator;
                c.n = b.alias;
                c.h = b;
                return c;
            };
            a.createTo = (b) => {
                let c = new SummaryDescription(1, b.p);
                c.operand = b.c;
                c.calculator = b.f;
                c.alias = b.n;
                b.h = c;
                return c;
            };
        }
        get i() {
            return this.f.shouldDetachOnTargetChange;
        }
        set i(a) {
            this.f.shouldDetachOnTargetChange = a;
        }
        get e() {
            return this.d;
        }
        set e(a) {
            if (a == null) {
                this.f.syncTarget = null;
                this.d = null;
                return;
            }
            this.d = a;
            this.f.syncTarget = this.d.g();
        }
        g(a) {
            return this.f.add(a);
        }
        o(a, b) {
            this.f.add1(a, b);
        }
        n() {
            this.f.clear();
        }
        get(a) {
            return this.f.get(a);
        }
        k(a) {
            return this.f.indexOf(a);
        }
        h(a) {
            return this.f.remove1(a);
        }
        b(a) {
            return this.f.remove(a);
        }
        set(a, b) {
            return this.f.set(a, b);
        }
        size() {
            return this.f.size();
        }
        m(a) {
            this.f.addListener(a);
        }
        p(a) {
            this.f.removeListener(a);
        }
        get j() {
            return this.f.all;
        }
    }
    ChartSummaryDescriptionCollection.$t = markType(ChartSummaryDescriptionCollection, 'ChartSummaryDescriptionCollection');
    return ChartSummaryDescriptionCollection;
})();
