import React, { useEffect, useState } from 'react';
import './detectBorder.less';
export default function DetectBorder(props) {
  var _useState = useState({}),
    style = _useState[0],
    setStyle = _useState[1];
  useEffect(function () {
    if (props.position && props.show) {
      setStyle({
        borderStyle: props.type,
        left: props.position.left,
        width: props.position.width,
        height: props.position.height,
        top: props.position.top
      });
    } else {
      setStyle({});
    }
  }, [props.show, props.position]);
  return /*#__PURE__*/React.createElement("div", {
    className: "vitis-detect-border",
    style: style
  });
}