React = require 'react'
_ = require 'underscore'
_str = require 'underscore.string'
###
This component renders input controls for a subtree of the N1 config-schema
and reads/writes current values using the `config` prop, which is expected to
be an instance of the config provided by `ConfigPropContainer`.
The config schema follows the JSON Schema standard: http://json-schema.org/
###
class ConfigSchemaItem extends React.Component
@displayName: 'ConfigSchemaItem'
@propTypes:
config: React.PropTypes.object
configSchema: React.PropTypes.object
keyPath: React.PropTypes.string
render: ->
return false unless @_appliesToPlatform()
if @props.configSchema.type is 'object'
{_str.humanize(@props.keyName)}
{_.pairs(@props.configSchema.properties).map ([key, value]) =>