// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. import {FormattedMessage} from 'react-intl'; import PropTypes from 'prop-types'; import React from 'react'; export default class ViewImagePopoverBar extends React.Component { render() { var publicLink = ''; if (global.window.mm_config.EnablePublicLink === 'true') { publicLink = (
{' | '}
); } var footerClass = 'modal-button-bar'; if (this.props.show) { footerClass += ' footer--show'; } return (
{publicLink}
); } } ViewImagePopoverBar.defaultProps = { show: false, imgId: 0, totalFiles: 0, filename: '', fileURL: '' }; ViewImagePopoverBar.propTypes = { show: PropTypes.bool.isRequired, fileId: PropTypes.number.isRequired, totalFiles: PropTypes.number.isRequired, filename: PropTypes.string.isRequired, fileURL: PropTypes.string.isRequired, onGetPublicLink: PropTypes.func.isRequired };