 async = require('async')
 
 {React, ReactDOM, rclass, rtypes, is_redux, is_redux_actions} = require('./smc-react')
-{Alert, Button, ButtonToolbar, Col, Input, OverlayTrigger, Popover, Row, Well} = require('react-bootstrap')
+{Alert, Button, ButtonToolbar, Col, Input, OverlayTrigger, Popover, Tooltip, Row, Well} = require('react-bootstrap')
 {HelpEmailLink, SiteName, CompanyName, PricingUrl, PolicyTOSPageUrl, PolicyIndexPageUrl, PolicyPricingPageUrl} = require('./customize')
 
 Combobox = require('react-widgets/lib/Combobox')

    displayName : 'Misc-TimeAgo'

    propTypes :
        placeholder : rtypes.number

    getDefaultProps: ->
        minPeriod : 45000
        # critical to use minPeriod>>1000, or things will get really slow in the client!!
        # Also, given our custom formatter, anything more than about 45s is pointless (since we don't show seconds)

    render: ->
        <TimeAgo date={@props.date} style={@props.style} formatter={timeago_formatter} minPeriod={@props.minPeriod} />


# Important:

        <span>{<Icon name={@props.icon}/> if @props.icon} {@props.title}</span>

    render_popover : ->
        if @props.tip
            <Popover
                bsSize = {@props.size}
                title  = {@render_title()}
                id     = {@props.id ? "tip"}
                >
                <span style={wordWrap:'break-word'}>
                    {@props.tip}
                </span>
            </Popover>
        else
            <Tooltip
                bsSize = {@props.size}
                id     = {@props.id ? "tip"} >
                {@render_title()}
            </Tooltip>

    render : ->
        <OverlayTrigger
