{"version":3,"file":"CopygramWebhookExample.BAtFk8Zl.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/f7eCXSl3cPAzj23Cdrxj/5oxe7R6Px6Gb6Q9IWdyo/CopygramWebhookExample.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const examples={opening:{action:\"buy\",order_type:\"BUY\",symbol:\"GBPJPY\",volume:.01,sl:185,tp:186.5,signal_id:\"qt_102938\"},update:{action:\"modify\",symbol:\"GBPJPY\",sl:185.4,signal_id:\"qt_102938\"}};/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 440\n * @framerIntrinsicHeight 270\n */export default function CopygramWebhookExample({example=\"opening\",fontSize=14,textColor=\"#ffffff\",style}){const[status,setStatus]=React.useState(\"\");const value=JSON.stringify(examples[example]||examples.opening,null,2);async function copy(){try{if(typeof navigator===\"undefined\"||!navigator.clipboard)throw new Error(\"Clipboard unavailable\");await navigator.clipboard.writeText(value);setStatus(\"Copied\");}catch{setStatus(\"Select the text to copy\");}}return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height:\"auto\",minWidth:0,color:textColor,display:\"flex\",flexDirection:\"column\",gap:12},children:[/*#__PURE__*/_jsx(\"pre\",{style:{margin:0,width:\"100%\",minWidth:0,whiteSpace:\"pre-wrap\",overflowWrap:\"anywhere\",fontFamily:'\"Roboto Mono\", monospace',fontSize,fontWeight:500,lineHeight:1.55,userSelect:\"text\",color:textColor},children:/*#__PURE__*/_jsx(\"code\",{children:value})}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:12,flexWrap:\"wrap\"},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:copy,\"aria-label\":`Copy ${example===\"opening\"?\"opening alert\":\"stop-loss update\"} JSON`,style:{appearance:\"none\",border:\"1px solid #5a5568\",borderRadius:999,padding:\"8px 16px\",background:\"#24222c\",color:textColor,font:\"500 12px Inter, sans-serif\",cursor:\"pointer\"},children:\"Copy JSON\"}),/*#__PURE__*/_jsx(\"span\",{role:\"status\",\"aria-live\":\"polite\",style:{font:\"400 12px Inter, sans-serif\"},children:status})]})]});}addPropertyControls(CopygramWebhookExample,{example:{type:ControlType.Enum,title:\"Example\",options:[\"opening\",\"update\"],optionTitles:[\"Opening alert\",\"Stop-loss update\"],defaultValue:\"opening\"},fontSize:{type:ControlType.Number,title:\"Text size\",defaultValue:14,min:12,max:18,step:1},textColor:{type:ControlType.Color,title:\"Text color\",defaultValue:\"#ffffff\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CopygramWebhookExample\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"440\",\"framerIntrinsicHeight\":\"270\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CopygramWebhookExample.map"],"mappings":"+LAKG,SAAwB,EAAuB,CAAC,UAAQ,UAAU,WAAS,GAAG,YAAU,UAAU,SAAO,CAAC,GAAK,CAAC,EAAO,GAAWA,EAAe,EAAE,EAAQ,EAAM,KAAK,UAAU,EAAS,IAAU,EAAS,QAAQ,KAAK,CAAC,EAAE,eAAe,GAAM,CAAC,GAAG,CAAC,GAAU,IAAY,QAAa,CAAC,EAAU,UAAU,MAAU,MAAM,uBAAuB,EAAE,MAAM,EAAU,UAAU,UAAU,CAAK,EAAE,EAAU,QAAQ,CAAE,MAAM,CAAC,EAAU,yBAAyB,CAAE,CAAC,CAAC,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,SAAS,EAAE,MAAM,EAAU,QAAQ,OAAO,cAAc,SAAS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