/* eslint-disable no-console */
// Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import React from 'react';
import {
Modal,
ModalHeader,
ModalBody,
ModalButtonGroup,
ModalButton,
} from 'amazon-chime-sdk-component-library-react';
import './ChannelModals.css';
export const ViewChannelDetailsModal = ({ onClose, channel, moderators }) => {
const modNames = moderators.map((m) => (
{m.Moderator.Name}
));
return (
Channel Name
{channel.Name}
{moderators.length > 0 ? (
) : null}
Type
{channel.Privacy === 'PRIVATE' && (
Private
(non-members can read and send messages)
)}
{channel.Privacy === 'PUBLIC' && (
Public
(only members can read and send messages)
)}
Mode
{channel.Mode === 'RESTRICTED' && (
Restricted
(administrators and moderators can add members)
)}
{channel.Mode === 'UNRESTRICTED' && (
Unrestricted
(any member can add other members)
)}
,
]}
/>
);
};
export default ViewChannelDetailsModal;