define('@cardstack/rendering/helpers/cs-placeholder', ['exports', '@cardstack/rendering/helpers/cs-humanize'], function (exports, _csHumanize) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = Ember.Helper.helper(function (params) {
    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
    var fieldConfig = options.fieldConfig,
        fieldCaption = options.fieldCaption,
        value = options.value,
        active = options.active,
        fieldName = options.fieldName;


    if (!active) {
      return value;
    }

    var isEmpty = !value;
    if (fieldConfig && fieldConfig.isEmpty) {
      isEmpty = fieldConfig.isEmpty(value);
    }
    if (isEmpty) {
      if (fieldConfig && fieldConfig.placeholder) {
        return fieldConfig.placeholder((0, _csHumanize.humanize)(fieldName));
      } else {
        return 'Enter ' + fieldCaption;
      }
    } else {
      return value;
    }
  });
});