'use strict';

var React = require('react');
var CreateChannel_context = require('../../CreateChannelProvider-88b316a6.js');
var CreateChannel_components_InviteUsers = require('./InviteUsers.js');
var CreateChannel_components_SelectChannelType = require('./SelectChannelType.js');
require('../../sendbirdSelectors.js');
require('../../_rollupPluginBabelHelpers-c5955c81.js');
require('../../topics-825e5d42.js');
require('../../utils-d5176360.js');
require('../../useSendbirdStateContext.js');
require('../../withSendbird.js');
require('../../LocalizationContext-af96cf5f.js');
require('../../stringSet-68748705.js');
require('../../index-83d1d15e.js');
require('../../ui/Modal.js');
require('react-dom');
require('../../index-68c57136.js');
require('../../ui/Button.js');
require('../../index-73643285.js');
require('prop-types');
require('../../ui/Icon.js');
require('../../ui/IconButton.js');
require('../../MediaQueryContext-8ec3f647.js');
require('../../ui/UserListItem.js');
require('../../UserProfileContext-f068b0ba.js');
require('../../ui/Avatar.js');
require('../../ui/ImageRenderer.js');
require('../../uuid-0b4ed44c.js');
require('../../ui/MutedAvatarOverlay.js');
require('../../ui/Checkbox.js');
require('../../ui/UserProfile.js');
require('../../ui/ContextMenu.js');
require('../../ui/SortByRow.js');
require('../../index-f2146bae.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
