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.
*/
var IgcColumnSortDescription = /** @class */ /*@__PURE__*/ (function () {
    function IgcColumnSortDescription() {
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    IgcColumnSortDescription.prototype.createImplementation = function () {
        return new ColumnSortDescription_internal(0);
    };
    Object.defineProperty(IgcColumnSortDescription.prototype, "i", {
        /**
         * @hidden
         */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgcColumnSortDescription.prototype.onImplementationCreated = function () {
    };
    IgcColumnSortDescription.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    Object.defineProperty(IgcColumnSortDescription.prototype, "field", {
        /**
         * Gets or sets the property being sorted.
        */
        get: function () {
            return this.i.f;
        },
        set: function (v) {
            this.i.f = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgcColumnSortDescription.prototype, "sortDirection", {
        /**
         * Gets or sets the direction to sort based on the property.
        */
        get: function () {
            return this.i.c;
        },
        set: function (v) {
            this.i.c = ensureEnum(ListSortDirection_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    IgcColumnSortDescription.prototype.findByName = function (name) {
        return null;
    };
    /**
     * Returns if the SortDescription is equal to another.
    
    * @param other  * The SortDescription to compare to.
    */
    IgcColumnSortDescription.prototype.equals = function (other) {
        var iv = this.i.equals(other);
        return (iv);
    };
    return IgcColumnSortDescription;
}());
export { IgcColumnSortDescription };
//# sourceMappingURL=igc-column-sort-description.js.map
