import React__default from 'react';
import { cleanup, render } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import ConfirmModal from '../confirm-modal.js';
import Action from '../action.js';
import '../../extends-C4cduGrv.js';
import '../../objectWithoutProperties-TXwlfNxG.js';
import 'prop-types';
import 'classnames';
import '../../button/index.js';
import '../../defineProperty-CEd-kZQW.js';
import '@reach/visually-hidden';
import '../../ck-icon/index.js';
import '../../ck-icon/assets/icon-map/index.js';
import '../../icon/index.js';
import '@fortawesome/react-fontawesome';
import '../../icon/icons.js';
import '../../icon/library.js';
import '@fortawesome/fontawesome-svg-core';
import '@fortawesome/pro-solid-svg-icons';
import '@fortawesome/pro-light-svg-icons';
import '@fortawesome/free-brands-svg-icons';
import '../../slicedToArray-BB-AwwkK.js';
import '../../floating-ui.react-cWPyyUrN.js';
import '../../typeof-CgC7Bq6K.js';
import '../../toConsumableArray-dKQYsfpV.js';
import '../../index-qSfOyGhk.js';
import 'react-dom';
import '../../button/button-group.js';
import '../../portal/index.js';
import '../../use-rerender-once/index.js';
import '../../use-force-update/index.js';
import '../../dialog.esm-C1hoFD2p.js';
import '../../portal.esm-CuKGPwhL.js';
import '../../utils.esm-CKyxlHOy.js';
import '../../warning-s9zGJbnw.js';
import '../../setPrototypeOf-Bchah3-D.js';
import '../../auto-id.esm-Cly76abB.js';
import 'framer-motion';

afterEach(cleanup);
describe("ConfirmModal", function () {
  it("renders", function () {
    var _render = render( /*#__PURE__*/React__default.createElement(ConfirmModal, {
      label: "Label",
      onClose: function onClose() {}
    }, "Content", /*#__PURE__*/React__default.createElement(Action, null, "Do not destroy"), /*#__PURE__*/React__default.createElement(Action, {
      destructive: true
    }, "Destroy"))),
        getByText = _render.getByText;

    expect(getByText("Label")).toBeInTheDocument();
    expect(getByText("Content")).toBeInTheDocument();
  });
  it("splits Actions out into a separate section", function () {
    var _render2 = render( /*#__PURE__*/React__default.createElement(ConfirmModal, {
      label: "Label",
      onClose: function onClose() {}
    }, "Content", /*#__PURE__*/React__default.createElement(Action, {
      destructive: true
    }, "Confirm"), /*#__PURE__*/React__default.createElement(Action, null, "Cancel"))),
        getByText = _render2.getByText; // Gets the DOM node containing the description. If we weren't
    // splitting the actions out, it would contain them too


    var description = getByText("Content");
    var confirm = getByText("Confirm");
    expect(description.contains(confirm)).toBe(false);
  });
});
