import { FunnelDataContext as FunnelDataContext_internal } from "./FunnelDataContext";
/**
 * Represents contextual data for the funnel chart.
*/
export class IgrFunnelDataContext {
    createImplementation() {
        return new FunnelDataContext_internal();
    }
    /**
     * @hidden
     */
    get i() {
        return this._implementation;
    }
    onImplementationCreated() {
    }
    constructor() {
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
        if (this._initializeAdapters) {
            this._initializeAdapters();
        }
    }
    _provideImplementation(i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
        if (this._initializeAdapters) {
            this._initializeAdapters();
        }
    }
    /**
     * The data item that is in context.
    */
    get item() {
        return this.i.item;
    }
    set item(v) {
        this.i.item = v;
    }
    /**
     * The index of the data item that is in context.
    */
    get index() {
        return this.i.b;
    }
    set index(v) {
        this.i.b = +v;
    }
    findByName(name) {
        if (this.findEphemera) {
            if (name && name.indexOf("@@e:") == 0) {
                return this.findEphemera(name);
            }
        }
        return null;
    }
}
