{"version":3,"file":"ChatButton.BGBcSWvI.mjs","names":[],"sources":["https:/framerusercontent.com/modules/Pkcey0Gy1Zf4fruq3aSh/ILJhQO3U3EzgjVXolXiD/ChatButton.js"],"sourcesContent":["// Button that triggers a click on .mm-chat-bubble element when clicked\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{startTransition}from\"react\";/**\n * Chat Button\n * \n * A button that triggers a click on the .mm-chat-bubble element when clicked.\n * Useful for opening chat widgets or support systems.\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function ChatButton(props){const{label,backgroundColor,textColor,hoverColor,borderRadius,paddingX,paddingY,font,buttonWidth,buttonHeight}=props;const handleClick=()=>{if(typeof document!==\"undefined\"){const chatBubble=document.querySelector(\".mm-chat-bubble\");if(chatBubble){startTransition(()=>{chatBubble.click();});}}};return /*#__PURE__*/_jsx(\"button\",{onClick:handleClick,style:{backgroundColor,color:textColor,border:\"none\",borderRadius:`${borderRadius}px`,paddingLeft:`${paddingX}px`,paddingRight:`${paddingX}px`,paddingTop:`${paddingY}px`,paddingBottom:`${paddingY}px`,cursor:\"pointer\",transition:\"background-color 0.2s ease\",width:buttonWidth===\"auto\"?\"max-content\":`${buttonWidth}px`,height:buttonHeight===\"auto\"?\"auto\":`${buttonHeight}px`,...font},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=hoverColor;},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=backgroundColor;},children:label});}addPropertyControls(ChatButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Chat with us\"},buttonWidth:{type:ControlType.Number,title:\"Width\",defaultValue:150,min:50,max:500,step:1,unit:\"px\",displayStepper:true},buttonHeight:{type:ControlType.Number,title:\"Height\",defaultValue:44,min:30,max:200,step:1,unit:\"px\",displayStepper:true},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},hoverColor:{type:ControlType.Color,title:\"Hover Color\",defaultValue:\"#333333\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,step:1,unit:\"px\"},paddingX:{type:ControlType.Number,title:\"Padding X\",defaultValue:24,min:0,max:100,step:1,unit:\"px\"},paddingY:{type:ControlType.Number,title:\"Padding Y\",defaultValue:12,min:0,max:100,step:1,unit:\"px\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ChatButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ChatButton.map"],"mappings":"2KASG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,QAAM,kBAAgB,YAAU,aAAW,eAAa,WAAS,WAAS,OAAK,cAAY,gBAAc,EAAwL,OAAoB,EAAK,SAAS,CAAC,YAA/L,CAAC,GAAG,OAAO,SAAW,IAAY,CAAC,IAAM,EAAW,SAAS,cAAc,kBAAkB,CAAI,GAAY,MAAoB,CAAC,EAAW,OAAO,EAAG,GAA4D,MAAM,CAAC,kBAAgB,MAAM,EAAU,OAAO,OAAO,aAAa,GAAG,EAAa,IAAI,YAAY,GAAG,EAAS,IAAI,aAAa,GAAG,EAAS,IAAI,WAAW,GAAG,EAAS,IAAI,cAAc,GAAG,EAAS,IAAI,OAAO,UAAU,WAAW,6BAA6B,MAAM,IAAc,OAAO,cAAc,GAAG,EAAY,IAAI,OAAO,IAAe,OAAO,OAAO,GAAG,EAAa,IAAI,GAAG,EAAK,CAAC,aAAa,GAAG,CAAC,EAAE,cAAc,MAAM,gBAAgB,GAAa,aA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