"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireDefault(require("react"));
var _useCopyClipboard = require("../providers/useCopyClipboard");
var _excluded = ["value", "children"];
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/CopyClipboard/CopyClipboard.tsx";
var CopyClipboard = _ref => {
  var {
      value = '',
      children = () => null
    } = _ref,
    propsWithNoDefaults = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  var {
    dataHook,
    className,
    onCopy,
    resetTimeout
  } = propsWithNoDefaults;
  var {
    isCopied,
    copyToClipboard,
    reset
  } = (0, _useCopyClipboard.useCopyClipboard)({
    value,
    onCopy,
    resetTimeout
  });
  return /*#__PURE__*/_react.default.createElement("div", {
    className: className,
    "data-hook": dataHook,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 18,
      columnNumber: 5
    }
  }, children({
    isCopied,
    copyToClipboard,
    reset
  }));
};
CopyClipboard.displayName = 'CopyClipboard';
var _default = exports.default = CopyClipboard;
//# sourceMappingURL=CopyClipboard.js.map