/**
 * DevExtreme (renovation/ui/pager/utils/get_element_width.js)
 * Version: 20.2.3 (build 20316-1558)
 * Build date: Wed Nov 11 2020
 *
 * Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
"use strict";
exports.getElementWidth = getElementWidth;
exports.getElementMinWidth = getElementMinWidth;
var _get_computed_style = _interopRequireDefault(require("./get_computed_style"));

function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : {
        "default": obj
    }
}

function toNumber(attribute) {
    return attribute ? Number(attribute.replace("px", "")) : 0
}

function getElementWidth(element) {
    var _getElementComputedSt;
    return toNumber(null === (_getElementComputedSt = (0, _get_computed_style.default)(element)) || void 0 === _getElementComputedSt ? void 0 : _getElementComputedSt.width)
}

function getElementMinWidth(element) {
    var _getElementComputedSt2;
    return toNumber(null === (_getElementComputedSt2 = (0, _get_computed_style.default)(element)) || void 0 === _getElementComputedSt2 ? void 0 : _getElementComputedSt2.minWidth)
}
