'use strict';

var React = require('react');
var CreateChannel_context = require('../../CreateChannelProvider-fa6b0038.js');
var CreateChannel_components_InviteUsers = require('./InviteUsers.js');
var CreateChannel_components_SelectChannelType = require('./SelectChannelType.js');
require('../../sendbirdSelectors.js');
require('../../_rollupPluginBabelHelpers-09eba4f3.js');
require('../../topics-b3f004b2.js');
require('../../utils-6916bad3.js');
require('../../useSendbirdStateContext.js');
require('../../withSendbird.js');
require('../../LocalizationContext-9eda9144.js');
require('../../stringSet-85aa5de9.js');
require('../../index-3a0cfa58.js');
require('../../ui/Modal.js');
require('react-dom');
require('../../index-61e3f022.js');
require('../../ui/Button.js');
require('../../index-4efb56bf.js');
require('prop-types');
require('../../ui/Icon.js');
require('../../ui/IconButton.js');
require('../../MediaQueryContext-d15578f3.js');
require('../../ui/UserListItem.js');
require('../../UserProfileContext-3a37e911.js');
require('../../ui/Avatar.js');
require('../../ui/ImageRenderer.js');
require('../../uuid-f2b80298.js');
require('../../ui/MutedAvatarOverlay.js');
require('../../ui/Checkbox.js');
require('../../ui/UserProfile.js');
require('../../ui/ContextMenu.js');
require('../../ui/SortByRow.js');
require('../../index-cf37de8c.js');
require('../../utils/message/getOutgoingMessageState.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

const CreateChannel = props => {
  const {
    onCancel,
    renderStepOne
  } = props;
  const {
    step,
    setStep,
    userListQuery
  } = CreateChannel_context.useCreateChannelContext();
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, step === 0 && ((renderStepOne === null || renderStepOne === void 0 ? void 0 : renderStepOne()) || /*#__PURE__*/React__default["default"].createElement(CreateChannel_components_SelectChannelType, {
    onCancel: onCancel
  })), step === 1 && /*#__PURE__*/React__default["default"].createElement(CreateChannel_components_InviteUsers, {
    userListQuery: userListQuery,
    onCancel: () => {
      setStep(0);
      onCancel();
    }
  }));
};

module.exports = CreateChannel;
//# sourceMappingURL=CreateChannelUI.js.map
