declare const _default: "<%\n//\n// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\").\n// You may not use this file except in compliance with the License.\n// A copy of the License is located at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// or in the \"license\" file accompanying this file. This file is distributed\n// on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n// express or implied. See the License for the specific language governing\n// permissions and limitations under the License.\n%>\n<%\n    // output the list of tokens as a Sass nested map\n    // (the values are pointing to the variables)\n    //\n    print(`$${file.mapName||'tokens'}: ${processJsonNode(dictionary.tokens, 0)};\\n`);\n\n    // recursive function to process a tokens JSON node\n    //\n    function processJsonNode(obj, depth) {\n        var output = '';\n        if (obj === null) {\n            output += `''`\n        } else if (typeof obj === \"string\") {\n            output += `'${obj}'`\n        } else if (obj.hasOwnProperty('value')) {\n            // if we have found a leaf (a property with a value) append the value\n            output += `$${obj.name}`;\n        } else {\n            // if we have found a group of tokens, use the Sass group \"(...)\" syntax and loop -recursively- on the children\n            output += '(\\n'\n            output += Object.keys(obj).map(function(newKey) {\n            var newProp = obj[newKey];\n            var indent = '  '.repeat(depth+1);\n            return `${indent}'${newKey}': ${processJsonNode(newProp, depth + 1)}`;\n            }).join(',\\n');\n            output += '\\n' + '  '.repeat(depth) + ')';\n        }\n        return output;\n    }\n%>";
export default _default;
