"use strict";

var _define = require("../preactement/define");
var _Tooltip = require("../../Tooltip");
var _wrapperUtils = require("../wrapperUtils");
var _utils = require("../utils");
var _jsxRuntime = require("preact/compat/jsx-runtime");
const attributes = ['active-class-name', 'class-name', 'close-button-label', 'component', 'content-heading', 'dialog', 'interactive-border', 'inversed', 'max-width', 'placement', 'root-id', 'show-close-button', 'title', 'transition-duration', 'trigger-aria-label', 'z-index'];

/* eslint-disable @typescript-eslint/no-namespace */

/* eslint-enable */

const Wrapper = _ref => {
  let {
    contentHeading,
    dialog,
    inversed,
    rootId,
    title,
    ...otherProps
  } = _ref;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
    ...otherProps,
    ariaLabel: otherProps.triggerAriaLabel,
    contentHeading: contentHeading,
    dialog: (0, _wrapperUtils.parseBooleanAttr)(dialog),
    inversed: (0, _wrapperUtils.parseBooleanAttr)(inversed),
    showCloseButton: (0, _wrapperUtils.parseBooleanAttr)(otherProps.showCloseButton),
    id: rootId,
    title: title,
    placement: (0, _utils.isPossibleValue)(otherProps.placement, _Tooltip.placements) ? otherProps.placement : _Tooltip.Tooltip.defaultProps.placement
  });
};
(0, _define.define)('ds-tooltip', () => Wrapper, {
  attributes
});