Liferay.Loader.define("dynamic-data-mapping-form-renderer@5.0.47/js/components/Field/MetalFieldAdapter.soy", ['module', 'exports', 'require', 'frontend-js-metal-web$metal-component', 'frontend-js-metal-web$metal-soy'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = exports.templates = exports.MetalFieldAdapter = void 0;

    var _metalComponent = _interopRequireDefault(require("frontend-js-metal-web$metal-component"));

    var _metalSoy = _interopRequireDefault(require("frontend-js-metal-web$metal-soy"));

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof(obj) {
          return typeof obj;
        };
      } else {
        _typeof = function _typeof(obj) {
          return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
        };
      }return _typeof(obj);
    }

    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }

    function _possibleConstructorReturn(self, call) {
      if (call && (_typeof(call) === "object" || typeof call === "function")) {
        return call;
      }return _assertThisInitialized(self);
    }

    function _assertThisInitialized(self) {
      if (self === void 0) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      }return self;
    }

    function _getPrototypeOf(o) {
      _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
        return o.__proto__ || Object.getPrototypeOf(o);
      };return _getPrototypeOf(o);
    }

    function _inherits(subClass, superClass) {
      if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function");
      }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });if (superClass) _setPrototypeOf(subClass, superClass);
    }

    function _setPrototypeOf(o, p) {
      _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
        o.__proto__ = p;return o;
      };return _setPrototypeOf(o, p);
    }

    var templates;
    exports.templates = templates;
    goog.loadModule(function (exports) {
      var soy = goog.require('soy');

      goog.require('soydata');

      // This file was automatically generated from MetalFieldAdapter.soy.
      // Please don't edit this file by hand.

      /**
       * @fileoverview Templates in namespace MetalFieldAdapter.
       * @hassoydelcall {PageRenderer.RegisterFieldType.idom}
       * @public
       */

      goog.module('MetalFieldAdapter.incrementaldom');

      goog.require('goog.soy.data.SanitizedContent');

      goog.require('soy');

      goog.require('soy.asserts');

      goog.require('soy.idom');

      /**
       * @param {{
       *  type: (!goog.soy.data.SanitizedContent|string),
       *  _handleFieldBlurred: (*|null|undefined),
       *  _handleFieldEdited: (*|null|undefined),
       *  _handleFieldFocused: (*|null|undefined),
       *  activePage: (null|number|undefined),
       *  editable: (boolean|null|undefined),
       *  field: (?),
       *  pageIndex: (null|number|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined)
       * }} opt_data
       * @param {Object<string, *>=} opt_ijData
       * @param {Object<string, *>=} opt_ijData_deprecated
       * @return {void}
       * @suppress {checkTypes}
       */

      function $render(opt_data, opt_ijData, opt_ijData_deprecated) {
        opt_ijData = opt_ijData_deprecated || opt_ijData;
        /** @type {!goog.soy.data.SanitizedContent|string} */

        var type = soy.asserts.assertType(goog.isString(opt_data.type) || opt_data.type instanceof goog.soy.data.SanitizedContent, 'type', opt_data.type, '!goog.soy.data.SanitizedContent|string');
        /** @type {*|null|undefined} */

        var _handleFieldBlurred = opt_data._handleFieldBlurred;
        /** @type {*|null|undefined} */

        var _handleFieldEdited = opt_data._handleFieldEdited;
        /** @type {*|null|undefined} */

        var _handleFieldFocused = opt_data._handleFieldFocused;
        /** @type {null|number|undefined} */

        var activePage = soy.asserts.assertType(opt_data.activePage == null || goog.isNumber(opt_data.activePage), 'activePage', opt_data.activePage, 'null|number|undefined');
        /** @type {boolean|null|undefined} */

        var editable = soy.asserts.assertType(opt_data.editable == null || goog.isBoolean(opt_data.editable) || opt_data.editable === 1 || opt_data.editable === 0, 'editable', opt_data.editable, 'boolean|null|undefined');
        /** @type {?} */

        var field = opt_data.field;
        /** @type {null|number|undefined} */

        var pageIndex = soy.asserts.assertType(opt_data.pageIndex == null || goog.isNumber(opt_data.pageIndex), 'pageIndex', opt_data.pageIndex, 'null|number|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */

        var spritemap = soy.asserts.assertType(opt_data.spritemap == null || goog.isString(opt_data.spritemap) || opt_data.spritemap instanceof goog.soy.data.SanitizedContent, 'spritemap', opt_data.spritemap, '!goog.soy.data.SanitizedContent|null|string|undefined');
        soy.$$getDelegateFn(soy.$$getDelTemplateId('PageRenderer.RegisterFieldType.idom'), type, true)(soy.$$assignDefaults({
          activePage: activePage,
          editable: editable,
          events: {
            fieldBlurred: _handleFieldBlurred,
            fieldEdited: _handleFieldEdited,
            fieldFocused: _handleFieldFocused
          },
          pageIndex: pageIndex,
          ref: 'pageRendererFieldRef' + field.instanceId,
          spritemap: spritemap
        }, field), null, opt_ijData);
      }

      exports.render = $render;
      /**
       * @typedef {{
       *  type: (!goog.soy.data.SanitizedContent|string),
       *  _handleFieldBlurred: (*|null|undefined),
       *  _handleFieldEdited: (*|null|undefined),
       *  _handleFieldFocused: (*|null|undefined),
       *  activePage: (null|number|undefined),
       *  editable: (boolean|null|undefined),
       *  field: (?),
       *  pageIndex: (null|number|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined)
       * }}
       */

      $render.Params;

      if (goog.DEBUG) {
        $render.soyTemplateName = 'MetalFieldAdapter.render';
      }

      exports.render.params = ["type", "_handleFieldBlurred", "_handleFieldEdited", "_handleFieldFocused", "activePage", "editable", "field", "pageIndex", "spritemap"];
      exports.render.types = {
        "type": "string",
        "_handleFieldBlurred": "any",
        "_handleFieldEdited": "any",
        "_handleFieldFocused": "any",
        "activePage": "number",
        "editable": "bool",
        "field": "?",
        "pageIndex": "number",
        "spritemap": "string"
      };
      exports.templates = templates = exports;
      return exports;
    });

    var MetalFieldAdapter = /*#__PURE__*/function (_Component) {
      _inherits(MetalFieldAdapter, _Component);

      function MetalFieldAdapter() {
        _classCallCheck(this, MetalFieldAdapter);

        return _possibleConstructorReturn(this, _getPrototypeOf(MetalFieldAdapter).apply(this, arguments));
      }

      return MetalFieldAdapter;
    }(_metalComponent.default);

    exports.MetalFieldAdapter = MetalFieldAdapter;

    _metalSoy.default.register(MetalFieldAdapter, templates);

    var _default = templates;
    /* jshint ignore:end */

    exports.default = _default;
    //# sourceMappingURL=MetalFieldAdapter.soy.js.map
  }
});
//# sourceMappingURL=MetalFieldAdapter.soy.js.map