import React from 'react';
import { useCopyClipboard } from '../providers/useCopyClipboard';
const CopyClipboard = ({ value = '', children = () => null, ...propsWithNoDefaults }) => {
    const { dataHook, className, onCopy, resetTimeout } = propsWithNoDefaults;
    const { isCopied, copyToClipboard, reset } = useCopyClipboard({
        value,
        onCopy,
        resetTimeout,
    });
    return (React.createElement("div", { className: className, "data-hook": dataHook }, children({
        isCopied,
        copyToClipboard,
        reset,
    })));
};
CopyClipboard.displayName = 'CopyClipboard';
export default CopyClipboard;
//# sourceMappingURL=CopyClipboard.js.map