/**
 * DevExtreme (renovation/pager/utils/get-element-width.p.js)
 * Version: 20.2.0 (build 20182-0310)
 * Build date: Tue Jun 30 2020
 *
 * Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
exports.getElementWidth = getElementWidth;
exports.getElementMinWidth = getElementMinWidth;
var _getComputedStyle = require("./get-computed-style.p");
var _getComputedStyle2 = _interopRequireDefault(_getComputedStyle);

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, _getComputedStyle2.default)(element)) || void 0 === _getElementComputedSt ? void 0 : _getElementComputedSt.width)
}

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