// TODO: Обновить prettier до версии 2.2.0+
/* eslint-disable prettier/prettier */ "use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "createApplyPaperMixin", {
    enumerable: true,
    get: function() {
        return createApplyPaperMixin;
    }
});
function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _object_spread(target) {
    for(var i = 1; i < arguments.length; i++){
        var source = arguments[i] != null ? arguments[i] : {};
        var ownKeys = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
            ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
            }));
        }
        ownKeys.forEach(function(key) {
            _define_property(target, key, source[key]);
        });
    }
    return target;
}
var createApplyPaperMixin = function createApplyPaperMixin(tokens) {
    return function(param) {
        var backgroundColor = param.backgroundColor, shadow = param.shadow, borderRadius = param.borderRadius, styles = param.styles;
        return _object_spread({
            backgroundColor: backgroundColor ? tokens[backgroundColor] : undefined,
            boxShadow: shadow ? tokens[shadow] : undefined,
            borderRadius: borderRadius ? tokens[borderRadius] : undefined
        }, styles);
    };
};
