import * as React from 'react'; import {get} from 'lodash'; import {superdeskApi} from '../../superdeskApi'; import {ILocation, IEventLocation} from '../../interfaces'; import {Item, Column, Row, Border, ActionMenu} from '../UI/List'; import {Button} from '../UI'; import {Location} from '../Location'; import {onEventCapture} from '../../utils'; import {formatLocationToAddress} from '../../utils/locations'; interface IProps { location?: ILocation | IEventLocation; active?: boolean; readOnly?: boolean; onRemoveLocation?(): void; } export class LocationItem extends React.PureComponent { render() { const {gettext} = superdeskApi.localization; const location = this.props.location; return ( {(this.props.readOnly || this.props.onRemoveLocation == null) ? null : (