// @flow import * as ICONS from 'constants/icons'; import React from 'react'; import classnames from 'classnames'; import { Menu, MenuButton, MenuList, MenuItem } from '@reach/menu-button'; import Icon from 'component/common/icon'; type Props = { claim: ?Claim, inline?: boolean, claimIsMine: boolean, channelIsMuted: boolean, channelIsBlocked: boolean, doToggleMuteChannel: (string) => void, doCommentModBlock: (string) => void, doCommentModUnBlock: (string) => void, }; function ClaimMenuList(props: Props) { const { claim, inline = false, claimIsMine, doToggleMuteChannel, channelIsMuted, channelIsBlocked, doCommentModBlock, doCommentModUnBlock, } = props; const channelUri = claim && (claim.value_type === 'channel' ? claim.permanent_url : claim.signing_channel && claim.signing_channel.permanent_url); if (!channelUri) { return null; } function handleToggleMute() { doToggleMuteChannel(channelUri); } function handleToggleBlock() { if (channelIsBlocked) { doCommentModUnBlock(channelUri); } else { doCommentModBlock(channelUri); } } return (
); } export default ClaimMenuList;