{"version":3,"file":"Link_Copy_Component.BWD401Pr.mjs","names":["React.useState","React.useRef","React.useMemo","p"],"sources":["https:/framerusercontent.com/modules/8ydo9eeIyAT0GKl14zE5/e2LPVa1AsnETGWTeE94O/Link_Copy_Component.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function CopyVideoLinkButton(props){const{label,copiedLabel,copyLink}=props;const[copied,setCopied]=React.useState(false);const[burstKey,setBurstKey]=React.useState(0);const timeoutRef=React.useRef(null);const particles=React.useMemo(()=>{const count=18;return Array.from({length:count},(_,i)=>{const angle=Math.PI*2*i/count+Math.random()*.35;const distance=38+Math.random()*26;return{id:i,x:Math.cos(angle)*distance,y:Math.sin(angle)*distance,dx:Math.cos(angle)*(22+Math.random()*22),dy:Math.sin(angle)*(22+Math.random()*22),size:4+Math.random()*6,delay:Math.random()*.08,duration:.75+Math.random()*.35};});},[burstKey]);React.useEffect(()=>{return()=>{if(timeoutRef.current)window.clearTimeout(timeoutRef.current);};},[]);async function handleCopy(){if(!copyLink)return;try{await navigator.clipboard.writeText(copyLink);}catch{const textArea=document.createElement(\"textarea\");textArea.value=copyLink;document.body.appendChild(textArea);textArea.select();document.execCommand(\"copy\");document.body.removeChild(textArea);}setCopied(true);setBurstKey(prev=>prev+1);if(timeoutRef.current)window.clearTimeout(timeoutRef.current);timeoutRef.current=window.setTimeout(()=>{setCopied(false);},1800);}return /*#__PURE__*/_jsxs(\"div\",{style:styles.wrapper,children:[/*#__PURE__*/_jsx(\"style\",{children:css}),/*#__PURE__*/_jsxs(\"button\",{onClick:handleCopy,style:styles.button,children:[/*#__PURE__*/_jsx(\"div\",{style:styles.glow}),/*#__PURE__*/_jsx(\"div\",{style:styles.shine}),/*#__PURE__*/_jsx(\"span\",{style:styles.label,children:copied?copiedLabel:label}),/*#__PURE__*/_jsx(\"div\",{style:styles.particleLayer,children:copied&&particles.map(p=>/*#__PURE__*/_jsx(\"span\",{style:{...styles.particle,width:p.size,height:p.size,left:`calc(50% - ${p.size/2}px)`,top:`calc(50% - ${p.size/2}px)`,[\"--x\"]:`${p.x}px`,[\"--y\"]:`${p.y}px`,[\"--dx\"]:`${p.dx}px`,[\"--dy\"]:`${p.dy}px`,animationDelay:`${p.delay}s`,animationDuration:`${p.duration}s`}},`${burstKey}-${p.id}`))},burstKey)]})]});}addPropertyControls(CopyVideoLinkButton,{label:{type:ControlType.String,title:\"Button Label\",defaultValue:\"Copy Video Link\"},copiedLabel:{type:ControlType.String,title:\"Copied State Text\",defaultValue:\"Copied!\"},copyLink:{type:ControlType.String,title:\"Copy Link\",defaultValue:\"https://example.com/video\"}});const styles={wrapper:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},button:{position:\"relative\",width:\"100%\",height:\"100%\",minHeight:56,borderRadius:18,border:\"1px solid rgba(255,210,120,0.3)\",background:\"linear-gradient(180deg,#18181A,#0C0C0E)\",color:\"#F6E7B0\",fontSize:16,fontWeight:700,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"visible\",boxShadow:\"0 10px 30px rgba(0,0,0,0.5), 0 0 30px rgba(220,170,70,0.15)\"},label:{position:\"relative\",zIndex:2},glow:{position:\"absolute\",inset:0,borderRadius:18,background:\"radial-gradient(circle, rgba(255,205,100,0.15), transparent 70%)\"},shine:{position:\"absolute\",inset:1,borderRadius:17,background:\"linear-gradient(135deg, rgba(255,255,255,0.08), transparent 50%)\"},particleLayer:{position:\"absolute\",inset:-50,pointerEvents:\"none\"},particle:{position:\"absolute\",borderRadius:\"999px\",background:\"radial-gradient(circle, #FFF4C7, #FFD977, #D69B1E)\",opacity:0,animationName:\"burst\",animationFillMode:\"forwards\"}};const css=`\n@keyframes burst {\n    0% { opacity: 0; transform: translate(0,0) scale(0.4); }\n    10% { opacity: 1; }\n    70% { opacity: 1; transform: translate(var(--x), var(--y)) scale(1); }\n    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }\n}\n`;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CopyVideoLinkButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Link_Copy_Component.map"],"mappings":"sNAAyI,SAAwB,EAAoB,EAAM,CAAC,GAAK,CAAC,QAAM,cAAY,YAAU,EAAW,CAAC,EAAO,GAAWA,EAAe,GAAM,CAAM,CAAC,EAAS,GAAaA,EAAe,EAAE,CAAO,EAAWC,EAAa,KAAK,CAAO,EAAUC,MAAyC,MAAM,KAAK,CAAC,OAAO,GAAM,EAAE,EAAE,IAAI,CAAC,IAAM,EAAM,KAAK,GAAG,EAAE,EAAE,GAAM,KAAK,QAAQ,CAAC,IAAU,EAAS,GAAG,KAAK,QAAQ,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,EAAE,KAAK,IAAI,EAAM,CAAC,EAAS,EAAE,KAAK,IAAI,EAAM,CAAC,EAAS,GAAG,KAAK,IAAI,EAAM,EAAE,GAAG,KAAK,QAAQ,CAAC,IAAI,GAAG,KAAK,IAAI,EAAM,EAAE,GAAG,KAAK,QAAQ,CAAC,IAAI,KAAK,EAAE,KAAK,QAAQ,CAAC,EAAE,MAAM,KAAK,QAAQ,CAAC,IAAI,SAAS,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAG,CAAG,CAAC,EAAS,CAAC,CAAC,UAA+B,CAAI,EAAW,SAAQ,EAAO,aAAa,EAAW,QAAQ,EAAK,EAAE,CAAC,CAAC,eAAe,GAAY,CAAK,KAAgB,IAAG,CAAC,MAAM,EAAU,UAAU,UAAU,EAAS,MAAO,CAAC,IAAM,EAAS,SAAS,cAAc,WAAW,CAAC,EAAS,MAAM,EAAS,SAAS,KAAK,YAAY,EAAS,CAAC,EAAS,QAAQ,CAAC,SAAS,YAAY,OAAO,CAAC,SAAS,KAA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