import React from 'react'; import PropTypes from 'prop-types'; import { Session } from 'meteor/session'; import { defineMessages, injectIntl } from 'react-intl'; import injectWbResizeEvent from '/imports/ui/components/presentation/resize-wrapper/component'; import Button from '/imports/ui/components/button/component'; import NoteService from './service'; import { styles } from './styles'; const intlMessages = defineMessages({ hideNoteLabel: { id: 'app.note.hideNoteLabel', description: 'Label for hiding note button', }, title: { id: 'app.note.title', description: 'Title for the shared notes', }, tipLabel: { id: 'app.note.tipLabel', description: 'Label for tip on how to escape iframe', }, }); const propTypes = { isLocked: PropTypes.bool.isRequired, intl: PropTypes.shape({ formatMessage: PropTypes.func.isRequired, }).isRequired, }; const defaultProps = { }; const Note = (props) => { const { isLocked, intl, } = props; const url = isLocked ? NoteService.getReadOnlyURL() : NoteService.getNoteURL(); return (