/**
 * DevExtreme (renovation/viz/common/utils.js)
 * Version: 21.1.0 (build 21016-0316)
 * Build date: Sat Jan 16 2021
 *
 * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
"use strict";
exports.getFormatValue = getFormatValue;
var _format_helper = _interopRequireDefault(require("../../../format_helper"));

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

function getFormatValue(value, specialFormat, _ref) {
    var argumentFormat = _ref.argumentFormat,
        format = _ref.format;
    var option = format;
    if (specialFormat) {
        option = "argument" === specialFormat ? argumentFormat : {
            type: "percent",
            precision: null === format || void 0 === format ? void 0 : format.percentPrecision
        }
    }
    return _format_helper.default.format(value, option)
}
