{"version":3,"file":"Chatbot.Bf7MEBmK.mjs","names":[],"sources":["https:/framerusercontent.com/modules/AiLRV8fD9lM34lttI9n9/to2xjzMp5VZCLM5qZv7h/Chatbot.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const SCRIPT_ID=\"edgegap-support-widget\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function Chatbot(props){const onCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{// Not on the editing canvas, and only once per page however many\n// instances exist or however often Framer re-renders.\nif(onCanvas||document.getElementById(SCRIPT_ID))return;const script=document.createElement(\"script\");script.id=SCRIPT_ID;script.async=true;script.src=props.src;if(props.theme!==\"auto\")script.dataset.theme=props.theme;if(props.open)script.dataset.open=\"true\";document.body.appendChild(script);},[]);// A label on the canvas so the component can be found and selected;\n// nothing at all on the live page.\nreturn onCanvas?/*#__PURE__*/_jsx(\"div\",{style:{padding:8,fontSize:12,color:\"#888\",border:\"1px dashed #888\",borderRadius:6},children:\"Support widget (loads in preview and on the published site)\"}):null;}addPropertyControls(Chatbot,{src:{title:\"Script URL\",type:ControlType.String,defaultValue:\"https://support-static.edgegap.workers.dev/v1/widget.js\"},theme:{title:\"Theme\",type:ControlType.Enum,options:[\"auto\",\"light\",\"dark\"],optionTitles:[\"Follow OS\",\"Light\",\"Dark\"],defaultValue:\"auto\"},open:{title:\"Open on load\",type:ControlType.Boolean,description:\"Opens the panel once the page has loaded. Loads the whole widget on every view of the page.\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Chatbot\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Chatbot.map"],"mappings":"kLAGG,SAAwB,EAAQ,EAAM,CAAC,IAAM,EAAS,EAAa,QAAQ,IAAI,EAAa,OAI/F,OAJsG,MAAc,CAEpH,GAAG,GAAU,SAAS,eAAe,CAAS,EAAE,OAAO,IAAM,EAAO,SAAS,cAAc,QAAQ,EAAE,EAAO,GAAG,EAAU,EAAO,MAAM,GAAK,EAAO,IAAI,EAAM,IAAO,EAAM,QAAQ,SAAO,EAAO,QAAQ,MAAM,EAAM,OAAS,EAAM,OAAK,EAAO,QAAQ,KAAK,QAAO,SAAS,KAAK,YAAY,CAAM,CAAE,EAAE,CAAC,CAAC,EAEjS,EAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,GAAG,MAAM,OAAO,OAAO,kBAAkB,aAAa,CAAC,EAAE,SAAS,6DAA6D,CAAC,EAAE,IAAK,mBAPhK,IAA6B,IAAiE,EAAO,EAAU,yBAOkD,EAAoB,EAAQ,CAAC,IAAI,CAAC,MAAM,aAAa,KAAK,EAAY,OAAO,aAAa,yDAAyD,EAAE,MAAM,CAAC,MAAM,QAAQ,KAAK,EAAY,KAAK,QAAQ,CAAC,OAAO,QAAQ,MAAM,EAAE,aAAa,CAAC,YAAY,QAAQ,MAAM,EAAE,aAAa,MAAM,EAAE,KAAK,CAAC,MAAM,eAAe,KAAK,EAAY,QAAQ,YAAY,8FAA8F,aAAa,EAAK,CAAC,CAAC"}