import { TransactionType_$type } from "./TransactionType";
import { ensureEnum } from "./componentUtil";
/**
 * Represents the final state of items with all transactions combined.
*/
export class IgxTransactionState {
    constructor() {
    }
    /**
     * @hidden
     */
    get i() {
        return this._implementation;
    }
    onImplementationCreated() {
    }
    _provideImplementation(i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    /**
     * Gets or sets the ID for the state.  I.e. an items primary key.
    */
    get id() {
        return this.i.id;
    }
    set id(v) {
        this.i.id = v;
    }
    /**
     * Gets or sets how this state was created.
    */
    get transactionType() {
        return this.i.transactionType;
    }
    set transactionType(v) {
        this.i.transactionType = ensureEnum(TransactionType_$type, v);
    }
    /**
     * Gets or sets the final value with all transaction deltas combined.
    */
    get value() {
        return this.i.value;
    }
    set value(v) {
        this.i.value = v;
    }
    /**
     * Gets or sets the version data for this item. Used for concurrency.
    */
    get version() {
        return this.i.version;
    }
    set version(v) {
        this.i.version = v;
    }
    findByName(name) {
        return null;
    }
}
