define('@cardstack/rendering/helpers/cs-field-type', ['exports', '@cardstack/rendering/-private/meta-for-field', '@cardstack/rendering/-private/strip-namespace'], function (exports, _metaForField, _stripNamespace) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.fieldType = fieldType;
  function fieldType(content, fieldName) {
    var meta = (0, _metaForField.default)(content, fieldName);
    if (!meta) {
      return;
    }

    // meta.options.fieldType is our convention for annotating
    // models. meta.type is the name of the transform that ember-data
    // is using, which we keep as a fallback.
    var type = meta.options && meta.options.fieldType;
    // meta.type is the name of the transform that ember-data
    // is using, which we keep as a fallback.
    if (!type && meta.type) {
      // lift the default ember-data transform names into our core types
      type = '@cardstack/core-types::' + meta.type;
    }

    if (type) {
      type = (0, _stripNamespace.default)(type);
    }
    return type;
  }

  exports.default = Ember.Helper.helper(fieldType);
});