{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/p4TQtb3EjoXXYWzFkWiu/LcAIiDtJUGKFnEHiQxKH/CopyEmailButton.js"],
  "sourcesContent": ["// Copy Email Button with Breadcrumb\n// Shows a button to copy an email address. When clicked, a small breadcrumb appears for feedback.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useRef,useEffect,startTransition}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * Copy Email Button\n *\n * @framerIntrinsicWidth 180\n * @framerIntrinsicHeight 48\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function CopyEmailButton(props){const{email,buttonLabel,copiedLabel,background,textColor,borderRadius,padding,breadcrumbPosition,font,style}=props;const[showBreadcrumb,setShowBreadcrumb]=useState(false);const timeoutRef=useRef(null);function handleCopy(){if(typeof window!==\"undefined\"){navigator.clipboard.writeText(email);startTransition(()=>setShowBreadcrumb(true));if(timeoutRef.current)window.clearTimeout(timeoutRef.current);timeoutRef.current=window.setTimeout(()=>{startTransition(()=>setShowBreadcrumb(false));},1600);}}useEffect(()=>{return()=>{if(timeoutRef.current)window.clearTimeout(timeoutRef.current);};},[]);if(RenderTarget.current()===RenderTarget.thumbnail)return null;return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",...style},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":buttonLabel,onClick:handleCopy,style:{width:\"100%\",height:\"100%\",background,color:textColor,border:\"none\",borderRadius,padding,cursor:\"pointer\",outline:\"none\",...font,fontFamily:font?.fontFamily,fontSize:font?.fontSize,fontWeight:font?.fontWeight,lineHeight:font?.lineHeight,letterSpacing:font?.letterSpacing,transition:\"background 0.15s\",position:\"relative\"},children:buttonLabel}),showBreadcrumb&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",...breadcrumbPosition===\"left\"&&{right:\"100%\",top:\"50%\",transform:\"translateY(-50%)\",marginRight:10},...breadcrumbPosition===\"right\"&&{left:\"100%\",top:\"50%\",transform:\"translateY(-50%)\",marginLeft:10},...breadcrumbPosition===\"top\"&&{bottom:\"100%\",left:\"50%\",transform:\"translateX(-50%)\",marginBottom:10},...breadcrumbPosition===\"bottom\"&&{top:\"100%\",left:\"50%\",transform:\"translateX(-50%)\",marginTop:10},background:\"#222\",color:\"#fff\",borderRadius:6,padding:\"6px 14px\",fontSize:13,boxShadow:\"0 2px 8px rgba(0,0,0,0.10)\",whiteSpace:\"nowrap\",pointerEvents:\"none\",opacity:1,zIndex:10},\"aria-live\":\"polite\",children:copiedLabel})]});}addPropertyControls(CopyEmailButton,{breadcrumbPosition:{type:ControlType.Enum,title:\"Breadcrumb\",options:[\"top\",\"right\",\"bottom\",\"left\"],optionTitles:[\"Top\",\"Right\",\"Bottom\",\"Left\"],defaultValue:\"left\",displaySegmentedControl:true},email:{type:ControlType.String,title:\"Email\",defaultValue:\"hello@example.com\",placeholder:\"hello@example.com\"},buttonLabel:{type:ControlType.String,title:\"Button Label\",defaultValue:\"Copy Email\"},copiedLabel:{type:ControlType.String,title:\"Copied Label\",defaultValue:\"Copied!\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#222\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#fff\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:32},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"0px 16px\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CopyEmailButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",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AM,UAAU,aAAa,UAAU,EAAE,KAAK,CAAC,KAAKA,EAAY,KAAK,MAAM,OAAO,SAAS,WAAW,gBAAgB,aAAa,aAAa,CAAC,SAAS,OAAO,QAAQ,WAAW,cAAc,UAAU,WAAW,OAAO,CAAC,CAAC,CAAC",
  "names": ["CopyEmailButton", "props", "email", "buttonLabel", "copiedLabel", "background", "textColor", "borderRadius", "padding", "breadcrumbPosition", "font", "style", "showBreadcrumb", "setShowBreadcrumb", "ye", "timeoutRef", "pe", "handleCopy", "window", "navigator", "Z", "ue", "RenderTarget", "u", "p", "addPropertyControls", "ControlType"]
}
