"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ContactCardEmbeddableReactFactory = exports.CONTACT_CARD_EMBEDDABLE_REACT = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _contact_card_embeddable_factory = require("./contact_card_embeddable_factory");
var _contact_card_embeddable_react = require("./contact_card_embeddable_react");
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0 and the Server Side Public License, v 1; you may not use this file except
 * in compliance with, at your election, the Elastic License 2.0 or the Server
 * Side Public License, v 1.
 */

const CONTACT_CARD_EMBEDDABLE_REACT = 'CONTACT_CARD_EMBEDDABLE_REACT';
exports.CONTACT_CARD_EMBEDDABLE_REACT = CONTACT_CARD_EMBEDDABLE_REACT;
class ContactCardEmbeddableReactFactory extends _contact_card_embeddable_factory.ContactCardEmbeddableFactory {
  constructor(...args) {
    super(...args);
    (0, _defineProperty2.default)(this, "type", CONTACT_CARD_EMBEDDABLE_REACT);
    (0, _defineProperty2.default)(this, "create", async (initialInput, parent) => {
      return new _contact_card_embeddable_react.ContactCardEmbeddableReact(initialInput, {
        execAction: this.execTrigger
      }, parent);
    });
  }
}
exports.ContactCardEmbeddableReactFactory = ContactCardEmbeddableReactFactory;