{"version":3,"file":"CopyPrompt.D_-bHhfz.mjs","names":["React.forwardRef","React.useState","React.useRef","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","ce","init_jsx_runtime","J","c","p","_e","de","navigator","motion","init_framer_Bf4_tcb2","addPropertyControls","cx","withCSS","useSVGTemplate","ControlType","mask","Base","MotionSVG","SVG","svg","getProps","Icon","init_oK82mNmE_","props","rest","animated","color","width1","alpha","restProps","href","className","qxTvv_EBh","ezTt3ayMo","lschgej4H","style","CopyPrompt","state","setState","timer","copy","text","label","icon","init_CopyPrompt"],"sources":["https:/framerusercontent.com/modules/JAHMTokngeA9GGzisyGP/XLcGrOA17MFCAwuXi5mB/oK82mNmE_.js","https:/framerusercontent.com/modules/bRDysGYz217QWZYpDKzh/j7tjP6cbq4BCI36TIX4T/CopyPrompt.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 0 0 L 0 4.5 L 7.5 4.5 L 7.5 12 L 12 12 L 12 0 Z\" fill-opacity=\"var(--1m6trwb, 0)\" fill=\"var(--21h8s6, rgb(0, 0, 0))\" height=\"12px\" id=\"cfNFsTWLl\" transform=\"translate(8.25 3.75)\" width=\"12px\"/><path d=\"M 7.5 12 L 12 12 L 12 0 L 0 0 L 0 4.5\" fill=\"transparent\" height=\"12px\" id=\"ODJ_TeZYo\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(8.25 3.75)\" width=\"12px\"/><path d=\"M 0 12 L 0 0 L 12 0 L 12 12 Z\" fill=\"transparent\" height=\"12px\" id=\"Ea3BNSkj5\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(3.75 8.25)\" width=\"12px\"/></svg>';const getProps=({alpha,color,height,id,width,width1,...props})=>{return{...props,ezTt3ayMo:color??props.ezTt3ayMo??\"rgb(0, 0, 0)\",lschgej4H:width1??props.lschgej4H??1.5,qxTvv_EBh:alpha??props.qxTvv_EBh};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,ezTt3ayMo,lschgej4H,qxTvv_EBh,...restProps}=getProps(props);const href=useSVGTemplate(\"743177299\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-vKAxf\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1m6trwb\":qxTvv_EBh,\"--21h8s6\":ezTt3ayMo,\"--pgex8v\":lschgej4H,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-vKAxf { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"ezTt3ayMo\":\"color\",\"lschgej4H\":\"width1\",\"qxTvv_EBh\":\"alpha\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Copy\",\"color\":{\"type\":\"variable\",\"value\":\"21h8s6\"},\"set\":{\"localId\":\"vectorSet/NGVKdicsm\",\"id\":\"NGVKdicsm\",\"moduleId\":\"omX0gWFPqDwhaiWwf6ab\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-vKAxf\");Icon.displayName=\"Copy\";export default Icon;addPropertyControls(Icon,{ezTt3ayMo:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Color\",type:ControlType.Color},lschgej4H:{defaultValue:1.5,displayStepper:true,hidden:false,max:6,min:0,step:.5,title:\"Width\",type:ControlType.Number},qxTvv_EBh:{defaultValue:0,displayStepper:true,hidden:false,max:1,min:0,step:.1,title:\"Alpha\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerImmutableVariables\":\"true\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"24\",\"framerIntrinsicHeight\":\"24\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerVector\":\"{\\\"name\\\":\\\"Copy\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"21h8s6\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/NGVKdicsm\\\",\\\"id\\\":\\\"NGVKdicsm\\\",\\\"moduleId\\\":\\\"omX0gWFPqDwhaiWwf6ab\\\"}}\",\"framerDisableUnlink\":\"true\",\"framerVariables\":\"{\\\"ezTt3ayMo\\\":\\\"color\\\",\\\"lschgej4H\\\":\\\"width1\\\",\\\"qxTvv_EBh\\\":\\\"alpha\\\"}\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/** @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto */export default function CopyPrompt({text=\"\",label=\"Copy prompt\",icon,style}){const[state,setState]=React.useState(\"\");const timer=React.useRef();React.useEffect(()=>()=>{if(timer.current)clearTimeout(timer.current);},[]);async function copy(){try{await navigator.clipboard.writeText(text);setState(\"Copied\");}catch{setState(\"Copy unavailable\");}if(timer.current)clearTimeout(timer.current);timer.current=setTimeout(()=>setState(\"\"),2200);}return /*#__PURE__*/_jsxs(\"button\",{type:\"button\",onClick:copy,disabled:!text,title:state||label||\"Copy book\",\"aria-label\":state||label||\"Copy book\",style:{...style,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:8,padding:\"8px 12px\",border:\"1px solid var(--token-edea5f20-b2fe-488b-9f5f-a421a90060c4)\",borderRadius:4,background:\"transparent\",color:\"var(--token-c83d1976-20a3-45c0-b929-e83187da5cd1)\",fontFamily:\"Inter\",fontSize:12,fontWeight:600,cursor:\"pointer\"},children:[icon,/*#__PURE__*/_jsx(\"span\",{\"aria-live\":\"polite\",children:state||label})]});}addPropertyControls(CopyPrompt,{text:{type:ControlType.String,title:\"Text\",displayTextArea:true},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Copy prompt\"},icon:{type:ControlType.ComponentInstance,title:\"Icon\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CopyPrompt\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CopyPrompt.map"],"mappings":"A,iVACgM,EAAK,0BAAgC,EAAkB,gBAAW,SAAS,EAAM,EAAI,CAAC,MAAoB,gBAAK,MAAM,CAAC,GAAG6B,EAAU,MAAI,SAASA,EAAM,QAAQ,CAAC,CAAE,CAAC,EAAQ,EAAUf,EAAO,OAAOQ,CAAI,EAAQ,EAAiB,iBAAY,EAAM,IAAM,CAAC,GAAK,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