/*
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 { IFastItemColumnInternal_$type } from "./IFastItemColumnInternal";
import { IFastItemColumn$1_$type } from "./IFastItemColumn$1";
import { Base, markType, TypeRegistrar } from "./type";
import { List$1 } from "./List$1";
import { NotImplementedException } from "./NotImplementedException";
import { FastItemColumn } from "./FastItemColumn";
export class FastItemObjectColumn extends Base {
    constructor(a, b, c, d) {
        super();
        this.f = null;
        this.c = false;
        this.a = null;
        this._propertyName = null;
        this.h = null;
        this.g = null;
        this.e = null;
        this.f = c;
        this.c = d;
        this.propertyName = b;
        this.b = a;
    }
    get b() {
        return this.a;
    }
    set b(a) {
        this.a = a;
        this.reset();
    }
    get propertyName() {
        return this._propertyName;
    }
    set propertyName(a) {
        this._propertyName = a;
    }
    get minimum() {
        return this.h;
    }
    set minimum(a) {
        this.h = a;
    }
    get maximum() {
        return this.g;
    }
    set maximum(a) {
        this.g = a;
    }
    item(a, b) {
        if (arguments.length === 2) {
            return b;
        }
        else {
            return this.e._inner[a];
        }
    }
    getEnumerator() {
        return this.e.getEnumerator();
    }
    getEnumeratorObject() {
        return this.e.getEnumerator();
    }
    contains(a) {
        return this.e.contains1(a);
    }
    copyTo(a, b) {
        this.e.copyTo(a, b);
    }
    get count() {
        return this.e.count;
    }
    get isReadOnly() {
        return true;
    }
    indexOf(a) {
        return this.e.indexOf1(a);
    }
    add(a) {
        throw new NotImplementedException(0);
    }
    clear() {
        throw new NotImplementedException(0);
    }
    remove(a) {
        throw new NotImplementedException(0);
    }
    insert(a, b) {
        throw new NotImplementedException(0);
    }
    removeAt(a) {
        throw new NotImplementedException(0);
    }
    reset() {
        this.e = null;
        return this.b != null ? this.insertRange(0, this.b.count) : true;
    }
    insertRange(a, b) {
        let c = ((() => {
            let $ret = new List$1(Base.$, 0);
            $ret.h = b;
            return $ret;
        })());
        for (let d = a; d < a + b; ++d) {
            let e = this.i(this.b.item(d));
            c.add1(e);
        }
        if (this.e == null) {
            this.e = c;
        }
        else {
            this.e.t(a, (c));
        }
        return true;
    }
    replaceRange(a, b) {
        let c = false;
        for (let d = 0; d < b; ++d) {
            let e = this.e._inner[a + d];
            let f = this.i(this.b.item(a + d));
            if (e != f) {
                this.e._inner[a + d] = f;
                c = true;
            }
        }
        return c;
    }
    removeRange(a, b) {
        this.e.v(a, b);
        return true;
    }
    i(a) {
        if (a == null) {
            return null;
        }
        let sourceItem_ = a;
        let from_ = a;
        let propertyName_ = this._propertyName;
        a = from_[propertyName_];
        if (this.c) {
            from_ = a;
            if ((typeof (from_) == 'function')) {
                a = from_.apply(sourceItem_);
            }
        }
        if (this.f != null) {
            a = this.f(a);
        }
        return a;
    }
    get mayContainUnknowns() {
        return true;
    }
    d() {
        return FastItemColumn.e(this.e, (a, b) => {
            let c = parseFloat(a);
            let d = parseFloat(b);
            if (c < d) {
                return -1;
            }
            if (c > d) {
                return 1;
            }
            return 0;
        });
    }
    asArray() {
        return this.e.asArray();
    }
    getItem(a) {
        return this.item(a);
    }
    static k() {
        TypeRegistrar.register("FastItemObjectColumn", FastItemObjectColumn.$);
    }
}
FastItemObjectColumn.$t = markType(FastItemObjectColumn, 'FastItemObjectColumn', Base.$, [IFastItemColumnInternal_$type, IFastItemColumn$1_$type.specialize(Base.$)]);
//# sourceMappingURL=FastItemObjectColumn.js.map