/**
 * DevExtreme (cjs/renovation/ui/scheduler/appointment/overflow_indicator/utils.js)
 * Version: 21.2.5 (build 22047-0313)
 * Build date: Wed Feb 16 2022
 *
 * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
"use strict";
exports.getOverflowIndicatorStyles = exports.getOverflowIndicatorColor = void 0;
var _utils = require("../../workspaces/utils");
var getOverflowIndicatorStyles = function(viewModel) {
    var color = viewModel.color,
        _viewModel$geometry = viewModel.geometry,
        height = _viewModel$geometry.height,
        left = _viewModel$geometry.left,
        top = _viewModel$geometry.top,
        width = _viewModel$geometry.width;
    var result = (0, _utils.addToStyles)([{
        attr: "left",
        value: "".concat(left, "px")
    }, {
        attr: "top",
        value: "".concat(top, "px")
    }, {
        attr: "width",
        value: "".concat(width, "px")
    }, {
        attr: "height",
        value: "".concat(height, "px")
    }]);
    if (color) {
        result = (0, _utils.addToStyles)([{
            attr: "backgroundColor",
            value: color
        }, {
            attr: "boxShadow",
            value: "inset ".concat(width, "px 0 0 0 rgba(0, 0, 0, 0.3)")
        }], result)
    }
    return result
};
exports.getOverflowIndicatorStyles = getOverflowIndicatorStyles;
var getOverflowIndicatorColor = function(color, colors) {
    return !colors.length || 0 === colors.filter((function(item) {
        return item !== color
    })).length ? color : void 0
};
exports.getOverflowIndicatorColor = getOverflowIndicatorColor;
