/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */

/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
import React from 'react';
import ReactDOM from 'react-dom';
import componentIsDeprecated from '../../utilities/warning/component-is-deprecated';
import Modal from './index'; // This component should be deprecated and appears to have
// been created in order to do modals in portals.

var ModalTrigger = {
  open: function open(cfg) {
    componentIsDeprecated('components/modal/trigger.jsx', 'This component is deprecated and appears to have been created in order to do modals in portals which is what current Modal has done for years.');
    var el = document.createElement('span');
    el.setAttribute('data-slds-modal', true);
    document.body.appendChild(el);
    var comp = React.createElement(Modal, {
      title: cfg.title,
      footer: cfg.footer,
      isOpen: true
    }, cfg.content);
    ReactDOM.render(comp, el);
  }
};
export default ModalTrigger;
//# sourceMappingURL=trigger.js.map