/*
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 * as tslib_1 from "tslib";
import { GridCellBase } from "./GridCellBase";
import { markType } from "igniteui-webcomponents-core";
/**
 * @hidden
 */
var TextCell = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(TextCell, _super);
    function TextCell(a) {
        var _this = _super.call(this, a) || this;
        _this.b8 = null;
        _this.cb = -1;
        _this.ca = -1;
        _this.b8 = a.createElement("span");
        _this.z.setRawStyleProperty("text-align", "left");
        _this.b8.setRawStyleProperty("display", "inline-block");
        _this.b8.setRawStyleProperty("line-height", "normal");
        _this.b8.setRawStyleProperty("vertical-align", "middle");
        _this.b8.setRawStyleProperty("overflow", "hidden");
        _this.b8.setRawStyleProperty("white-space", "nowrap");
        _this.b8.setRawStyleProperty("text-overflow", "ellipsis");
        _this.z.setRawStyleProperty("vertical-align", "middle");
        _this.z.append(_this.b8);
        return _this;
    }
    Object.defineProperty(TextCell.prototype, "b9", {
        get: function () {
            return this.b8;
        },
        enumerable: true,
        configurable: true
    });
    TextCell.prototype.bx = function (a, b) {
        _super.prototype.bx.call(this, a, b);
        var c = Math.max(0, a - b - (this.av + this.ax + this.aw));
        if (this.cb != c) {
            this.cb = c;
            this.b8.setRawStyleProperty("max-width", c.toString() + "px");
        }
    };
    TextCell.prototype.br = function (a, b) {
        _super.prototype.br.call(this, a, b);
        var c = Math.max(0, a - b);
        if (this.ca != c) {
            this.ca = c;
            this.b8.setRawStyleProperty("max-height", c.toString() + "px");
        }
    };
    TextCell.prototype.get_r = function () {
        return true;
    };
    TextCell.prototype.bh = function (a, b, c) {
        _super.prototype.bh.call(this, a, b, c);
        if (a == "Indent" || a == "IsCollapsable") {
            this.b8.setRawStyleProperty("margin-left", this.av + this.ax + this.aw + "px");
        }
    };
    TextCell.$t = markType(TextCell, 'TextCell', GridCellBase.$);
    return TextCell;
}(GridCellBase));
export { TextCell };
//# sourceMappingURL=TextCell.js.map
