{"version":3,"file":"Outset_Popup.CZmL4Tv-.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/BY3LdhpQ4O8QmAeWWsC0/uUTXBQB73SzX0OjMhINg/Outset_Popup.js"],"sourcesContent":["// Get Started: https://www.framer.com/developers\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";import{useState,useEffect}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function PromoModal(props){const{title,description,buttonText,buttonLink,backgroundColor,textColor,buttonColor,buttonTextColor,showCloseButton,font,displayProbability}=props;const[isVisible,setIsVisible]=useState(false);const[shouldDisplay,setShouldDisplay]=useState(false);useEffect(()=>{// Determine if modal should display based on probability\nconst randomValue=Math.random()*100;setShouldDisplay(randomValue<displayProbability);setIsVisible(randomValue<displayProbability);},[displayProbability]);const handleClose=()=>{setIsVisible(false);};const handleButtonClick=()=>{if(buttonLink){window.open(buttonLink,\"_blank\");}};if(!shouldDisplay){return null;}return /*#__PURE__*/_jsx(AnimatePresence,{children:isVisible&&/*#__PURE__*/_jsxs(motion.div,{style:{position:\"relative\",zIndex:10,backgroundColor:backgroundColor,borderRadius:20,padding:\"32px 24px 24px 24px\",maxWidth:400,boxShadow:\"0 20px 40px rgba(0, 0, 0, 0.2)\",...font},initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2},children:[showCloseButton&&/*#__PURE__*/_jsx(motion.button,{onClick:handleClose,style:{position:\"absolute\",top:24,right:24,background:\"transparent\",border:\"none\",cursor:\"pointer\",padding:4,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},whileHover:{scale:1.1},whileTap:{scale:.95},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:textColor,strokeWidth:\"2\",strokeLinecap:\"round\",children:[/*#__PURE__*/_jsx(\"line\",{x1:\"18\",y1:\"6\",x2:\"6\",y2:\"18\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"6\",y1:\"6\",x2:\"18\",y2:\"18\"})]})}),/*#__PURE__*/_jsx(\"h2\",{style:{margin:\"0 0 16px 0\",fontSize:24,fontWeight:600,color:textColor,lineHeight:1.2},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{margin:\"0 0 24px 0\",fontSize:16,fontWeight:400,color:textColor,opacity:.8,lineHeight:1.5},children:description}),/*#__PURE__*/_jsx(motion.button,{onClick:handleButtonClick,style:{width:\"100%\",backgroundColor:buttonColor,color:buttonTextColor,border:\"none\",borderRadius:12,padding:\"16px 24px\",fontSize:16,fontWeight:600,cursor:\"pointer\",...font},whileHover:{scale:1.02},whileTap:{scale:.98},children:buttonText})]})});}addPropertyControls(PromoModal,{title:{title:\"Title\",type:ControlType.String,defaultValue:\"Get First Month Free\"},description:{title:\"Description\",type:ControlType.String,defaultValue:\"Help us improve Warp by walking us through your onboarding experience and get your first month of Warp Build free.\",displayTextArea:true},buttonText:{title:\"Button Text\",type:ControlType.String,defaultValue:\"Claim Free Month\"},buttonLink:{title:\"Button URL\",type:ControlType.String,defaultValue:\"https://www.warp.dev\"},displayProbability:{title:\"Display %\",type:ControlType.Number,defaultValue:30,min:0,max:100,step:1,unit:\"%\"},font:{title:\"Font\",type:ControlType.Font},backgroundColor:{title:\"Background\",type:ControlType.Color,defaultValue:\"#F5F5F5\"},textColor:{title:\"Text Color\",type:ControlType.Color,defaultValue:\"#000000\"},buttonColor:{title:\"Button Color\",type:ControlType.Color,defaultValue:\"#2D2D2D\"},buttonTextColor:{title:\"Button Text\",type:ControlType.Color,defaultValue:\"#FFFFFF\"},showCloseButton:{title:\"Show Close\",type:ControlType.Boolean,defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PromoModal\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto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