import { useContext } from 'react';
import PropTypes from 'prop-types';
import Copy from '@arcblock/ux/lib/ClickToCopy';
import { LocaleContext } from '@arcblock/ux/lib/Locale/context';
import { jsx as _jsx } from "react/jsx-runtime";
export default function ClickToCopy({
  children,
  ...rest
}) {
  const {
    t
  } = useContext(LocaleContext);
  return /*#__PURE__*/_jsx(Copy, {
    tip: t('common.copyTip'),
    copiedTip: t('common.copiedTip'),
    ...rest,
    children: children
  });
}
ClickToCopy.propTypes = {
  children: PropTypes.any.isRequired
};