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// <%= file.destination %>\n//\n<%= fileHeader({ file, commentStyle: 'short' })%>\n#import \"<%= file.className %>.h\"\n\n@implementation <%= file.className %>\n\n+ (NSDictionary *)getProperty:(NSString *)keyPath {\n  return [[self properties] valueForKeyPath:keyPath];\n}\n\n+ (nonnull)getValue:(NSString *)keyPath {\n  return [[self properties] valueForKeyPath:[NSString stringWithFormat:@\"%@.value\", keyPath]];\n}\n\n+ (NSDictionary *)properties {\n  static NSDictionary * dictionary;\n  static dispatch_once_t onceToken;\n\n  dispatch_once(&onceToken, ^{\n    dictionary = <%= buildDictionary(dictionary.tokens) %>;\n  });\n\n  return dictionary;\n}\n\n@end\n\n<% function buildDictionary(tokens, indent) {\n  indent = indent || '  ';\n  var to_ret = '@{\\n';\n  if (tokens.hasOwnProperty('value')) {\n    var value = tokens.attributes.category === 'size' || tokens.attributes.category === 'time' ? '@' + tokens.value : tokens.value;\n    to_ret += indent + '@\"value\": ' + value + ',\\n';\n    to_ret += indent + '@\"name\": @\"' + tokens.name + '\",\\n';\n\n    for(var name in tokens.attributes) {\n      if (tokens.attributes[name]) {\n        to_ret += indent + '@\"' + name + '\": @\"' + tokens.attributes[name] + '\",\\n';\n      }\n    }\n\n    // remove last comma\n    return to_ret.slice(0, -2) + '\\n' + indent + '}';\n  } else {\n    for(var name in tokens) {\n      to_ret += indent + '@\"' + name + '\": ' + buildDictionary(tokens[name], indent + '  ') + ',\\n';\n    }\n    // remove last comma\n    return to_ret.slice(0, -2) + '\\n' + indent + '}';\n  }\n} %>";
export default _default;
