import classnames from 'classnames';
import useSettings from "../../_hooks/useSettings";
import { ClockIcon } from "../../_util/iconSvgHtml";
import "./style";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
export default function VmWrapper(props) {
  var _useSettings = useSettings(),
    isDark = _useSettings.isDark;
  var _props$title = props.title,
    title = _props$title === void 0 ? '基本信息' : _props$title,
    _props$time = props.time,
    time = _props$time === void 0 ? '' : _props$time,
    _props$border = props.border,
    border = _props$border === void 0 ? true : _props$border,
    extra = props.extra;
  var prefix = 'vm-title-wrap';
  return /*#__PURE__*/_jsxs("div", {
    className: classnames("".concat(prefix, " ").concat(isDark ? 'dark' : ''), {
      'no-border': !border
    }),
    children: [/*#__PURE__*/_jsx("div", {
      className: "".concat(prefix, "-title"),
      children: title
    }), extra ? extra : null, time && /*#__PURE__*/_jsxs("div", {
      className: "".concat(prefix, "-time-wrap"),
      children: [/*#__PURE__*/_jsx(ClockIcon, {
        width: 16,
        height: 16,
        fill: isDark ? '#6BA6DE' : '#8C8C8C'
      }), /*#__PURE__*/_jsx("div", {
        children: time
      })]
    })]
  });
}