"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
            t[p[i]] = s[p[i]];
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var react_aria_tooltip_1 = require("react-aria-tooltip");
var recompose_1 = require("recompose");
var styled_components_1 = require("styled-components");
var hoc_1 = require("../hoc");
var utils_1 = require("../utils");
var Base = function (props) {
    var message = props.message, innerProps = __rest(props, ["message"]);
    if (!innerProps.eventType) {
        innerProps.eventType = 'hover';
    }
    return React.createElement(react_aria_tooltip_1.default, __assign({ message: message || '' }, innerProps));
};
var Tooltip = styled_components_1.default(Base)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t.ra-tooltip {\n\t\tborder-radius: ", ";\n\n\t\tp {\n\t\t\tpadding: 3px 8px;\n\t\t\tfont-size: 12px;\n\t\t}\n\t}\n\n\t&.ra-tooltip-wrapper.active > .ra-tooltip {\n\t\t", ";\n\t}\n"], ["\n\t.ra-tooltip {\n\t\tborder-radius: ", ";\n\n\t\tp {\n\t\t\tpadding: 3px 8px;\n\t\t\tfont-size: 12px;\n\t\t}\n\t}\n\n\t&.ra-tooltip-wrapper.active > .ra-tooltip {\n\t\t", ";\n\t}\n"])), function (props) { return utils_1.px(props.theme.radius); }, function (props) { return (!props.message ? 'display: none;' : ''); });
exports.default = recompose_1.compose(styled_components_1.withTheme, hoc_1.default)(Tooltip);
var templateObject_1;
