"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getTooltip = getTooltip;
exports.getTooltipPlacement = getTooltipPlacement;
exports.getTooltipTheme = getTooltipTheme;
exports.getUsefulTooltip = getUsefulTooltip;

var _utils = require("../configure/utils");

function getUsefulTooltip(target) {
  switch (target) {
    case 'table-cell':
      return (0, _utils.getConfig)('tableColumnTooltip');

    case 'button':
      return (0, _utils.getConfig)('buttonTooltip');

    case 'select-option':
      return (0, _utils.getConfig)('selectOptionTooltip');

    case 'label':
      return (0, _utils.getConfig)('labelTooltip');

    default:
  }
}

function getTooltip(target) {
  var tooltip = (0, _utils.getConfig)('tooltip');

  if (typeof tooltip === 'function') {
    return tooltip(target);
  }

  return getUsefulTooltip(target) || tooltip;
}

function getTooltipTheme(target) {
  var tooltipTheme = (0, _utils.getConfig)('tooltipTheme');

  if (typeof tooltipTheme === 'function') {
    return tooltipTheme(target);
  }

  if (target === 'validation') {
    var validationTooltipTheme = (0, _utils.getConfig)('validationTooltipTheme');

    if (validationTooltipTheme) {
      return validationTooltipTheme;
    }
  }

  return tooltipTheme;
}

function getTooltipPlacement(target) {
  var tooltipPlacement = (0, _utils.getConfig)('tooltipPlacement');

  if (typeof tooltipPlacement === 'function') {
    return tooltipPlacement(target);
  }

  return tooltipPlacement;
}
//# sourceMappingURL=TooltipUtils.js.map
