/*
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 { WorksheetShapeVisitor$2 } from "./WorksheetShapeVisitor$2";
import { LegacyShapeData } from "./LegacyShapeData";
import { WorksheetCell } from "./WorksheetCell";
import { Boolean_$type, toNullable, Number_$type, markType } from "igniteui-angular-core";
import { ST_InsetMode_$type } from "./ST_InsetMode";
import { stringRemove } from "igniteui-angular-core";
/**
 * @hidden
 */
var ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData = /** @class */ (function (_super) {
    tslib_1.__extends(ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData, _super);
    function ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData() {
        return _super.call(this, LegacyShapeData.$, Boolean_$type) || this;
    }
    ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData.prototype.visitWorksheetCellComment = function (value, shapeData) {
        return this._visitWorksheetCellComment$i.apply(this, arguments);
    };
    ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData.prototype._visitWorksheetCellComment$i = function (a, b) {
        if (b == null) {
            return true;
        }
        var c = a.cell.worksheet;
        if (c == null) {
            return true;
        }
        b.s = toNullable(Boolean_$type, c._ec(a.cell._ab));
        b.t = toNullable(Number_$type, a.cell._ab);
        b.ai = toNullable(Boolean_$type, c._eg(a.cell.rowIndex));
        b.ah = toNullable(Number_$type, a.cell.rowIndex);
        b.k = true;
        b.z = toNullable(ST_InsetMode_$type, 0);
        b.j = 10;
        b.az = "#_x0000_t202";
        _super.prototype._visitWorksheetCellComment$i.call(this, a, b);
        b.am = toNullable(Boolean_$type, a.visible);
        return true;
    };
    ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData.prototype.b = function (a, b) {
        if (b == null) {
            return true;
        }
        b.a0(a);
        b.au = "_x0000_s" + a._cn;
        b.am = toNullable(Boolean_$type, null);
        if (a.visible == false || b.l == false) {
            var c = b.aw != null ? b.aw : "";
            var d = c.indexOf("visibility:");
            if (0 <= d) {
                var e = c.indexOf(";", d);
                if (e < 0) {
                    c = stringRemove(c, d);
                }
                else {
                    c = stringRemove(c, d, e - d + 1);
                }
            }
            if (c.length != 0) {
                c += ";";
            }
            c += "visibility:hidden";
            b.aw = c;
        }
        if (WorksheetCell.l_op_Inequality(a._aa, null)) {
            if (a._aa._o != null) {
                b.ao = a._aa._toString2(1, false, false, false);
            }
            else {
                a._aa = null;
            }
        }
        var t1 = a.positioningMode;
        L0: while (true) {
            switch (t1) {
                case 3:
                    b.ad = toNullable(Boolean_$type, true);
                    b.aj = toNullable(Boolean_$type, true);
                    break;
                case 0:
                    b.ad = toNullable(Boolean_$type, null);
                    b.aj = toNullable(Boolean_$type, null);
                    break;
                case 2:
                    b.ad = toNullable(Boolean_$type, null);
                    b.aj = toNullable(Boolean_$type, true);
                    break;
                default:
                    t1 = 0;
                    continue L0;
            }
            break;
        }
        return true;
    };
    ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData.$t = markType(ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData, 'ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData', WorksheetShapeVisitor$2.$.specialize(LegacyShapeData.$, Boolean_$type));
    ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData.d = new ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData();
    return ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData;
}(WorksheetShapeVisitor$2));
export { ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData };
//# sourceMappingURL=ObjectModelVmlDrawingPartManager_UpdateLegacyShapeData.js.map