{"version":3,"file":"helpers.cjs","sources":["../../../src/components/Clipboard/helpers.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from \"react\";\n\nexport function copyToClipboard(valueToCopy: string, setIsJustCopied: Dispatch<SetStateAction<boolean>>) {\n  setIsJustCopied(true);\n  navigator?.clipboard\n    ?.writeText(valueToCopy)\n    .then(() => {\n      console.log(\"Copy Successfull\");\n    })\n    .catch((error) => {\n      console.error(\"Failed to Copy text: \", error);\n      setIsJustCopied(false);\n    });\n  setTimeout(() => setIsJustCopied(false), 4000);\n}\n"],"names":[],"mappings":";;AACO,SAAS,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE;AAC9D,EAAE,eAAe,CAAC,IAAI,CAAC;AACvB,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,MAAM;AAC1D,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;AACnC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK;AACtB,IAAI,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC;AACjD,IAAI,eAAe,CAAC,KAAK,CAAC;AAC1B,EAAE,CAAC,CAAC;AACJ,EAAE,UAAU,CAAC,MAAM,eAAe,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC;AAC/C;;;;"}