import { ListSortDirection_$type } from "igniteui-webcomponents-core";
import { ColumnSortDescription as ColumnSortDescription_internal } from "./ColumnSortDescription";
import { ensureEnum } from "igniteui-webcomponents-core";
/**
 * Represents an element in the current sort applied to a data source or provider. Changes to this object are not observed or expected after it is initially assigned to a collection.
*/
export class IgcColumnSortDescription {
    createImplementation() {
        return new ColumnSortDescription_internal(0);
    }
    /**
     * @hidden
     */
    get i() {
        return this._implementation;
    }
    onImplementationCreated() {
    }
    constructor() {
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    _provideImplementation(i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    /**
     * Gets or sets the property being sorted.
    */
    get field() {
        return this.i.f;
    }
    set field(v) {
        this.i.f = v;
    }
    /**
     * Gets or sets the direction to sort based on the property.
    */
    get sortDirection() {
        return this.i.c;
    }
    set sortDirection(v) {
        this.i.c = ensureEnum(ListSortDirection_$type, v);
    }
    findByName(name) {
        return null;
    }
    /**
     * Returns if the SortDescription is equal to another.
    
    * @param other  * The SortDescription to compare to.
    */
    equals(other) {
        let iv = this.i.equals(other);
        return (iv);
    }
}
//# sourceMappingURL=igc-column-sort-description.js.map
