"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.HoverAnnotation = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _dom = require("../../lib/dom");
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0; you may not use this file except in compliance with the Elastic License
 * 2.0.
 */

const HoverAnnotation = ({
  transformMatrix,
  width,
  height
}) => /*#__PURE__*/_react.default.createElement("div", {
  className: "canvasHoverAnnotation canvasLayoutAnnotation",
  style: {
    width,
    height,
    marginLeft: -width / 2,
    marginTop: -height / 2,
    transform: (0, _dom.matrixToCSS)(transformMatrix)
  }
});
exports.HoverAnnotation = HoverAnnotation;
HoverAnnotation.propTypes = {
  height: _propTypes.default.number.isRequired,
  transformMatrix: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
  width: _propTypes.default.number.isRequired
};