{"version":3,"file":"FaqDrawer.UK3FPYFE.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/zIc6FflX1lusWxOqMz8e/1QRvtdZdjPV6HSU4jhwN/FaqDrawer.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{AnimatePresence,motion}from\"framer-motion\";import{useState}from\"react\";/**\n * Click-to-open FAQ drawer. Question always visible, answer reveals on click.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function FaqDrawer(props){const{question,answer,textColor,answerColor,lineColor,duration}=props;const[open,setOpen]=useState(false);const renderAnswer=()=>{if(answer==null)return null;if(typeof answer===\"string\"){return /*#__PURE__*/_jsx(\"div\",{dangerouslySetInnerHTML:{__html:answer}});}return answer;};return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",borderTop:`1px solid ${lineColor}`},children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>setOpen(!open),style:{all:\"unset\",display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:20,width:\"100%\",boxSizing:\"border-box\",padding:\"20px 0\",cursor:\"pointer\",fontFamily:\"'Chakra Petch', sans-serif\",fontWeight:700,fontSize:17,letterSpacing:\"0.02em\",lineHeight:1.3,textTransform:\"uppercase\",color:textColor},children:[/*#__PURE__*/_jsx(\"span\",{style:{flex:1},children:question}),/*#__PURE__*/_jsx(motion.span,{animate:{rotate:open?45:0},transition:{duration,ease:[.44,0,.56,1]},style:{fontSize:24,lineHeight:1,flexShrink:0,fontWeight:400},children:\"+\"})]}),/*#__PURE__*/_jsx(AnimatePresence,{initial:false,children:open&&/*#__PURE__*/_jsx(motion.div,{initial:{height:0,opacity:0},animate:{height:\"auto\",opacity:1},exit:{height:0,opacity:0},transition:{duration,ease:[.44,0,.56,1]},style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{padding:\"0 0 24px 0\",fontFamily:\"'Chakra Petch', sans-serif\",fontWeight:400,fontSize:15,lineHeight:1.55,color:answerColor,maxWidth:760},children:renderAnswer()})},\"answer\")})]});}FaqDrawer.defaultProps={question:\"Question goes here\",textColor:\"#FFFFFF\",answerColor:\"rgba(255,255,255,0.75)\",lineColor:\"rgba(255,255,255,0.2)\",duration:.35};addPropertyControls(FaqDrawer,{question:{type:ControlType.String,title:\"Question\",defaultValue:\"Question goes here\"},answer:{type:ControlType.RichText,title:\"Answer\"},textColor:{type:ControlType.Color,title:\"Question\",defaultValue:\"#FFFFFF\"},answerColor:{type:ControlType.Color,title:\"Answer\",defaultValue:\"rgba(255,255,255,0.75)\"},lineColor:{type:ControlType.Color,title:\"Divider\",defaultValue:\"rgba(255,255,255,0.2)\"},duration:{type:ControlType.Number,title:\"Speed\",min:.1,max:1.5,step:.05,defaultValue:.35}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FaqDrawer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FaqDrawer.map"],"mappings":"yOAKG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,WAAS,SAAO,YAAU,cAAY,YAAU,YAAU,EAAW,CAAC,EAAK,GAASA,EAAS,EAAK,EAA8K,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,UAAU,aAAa,GAAW,EAAE,SAAS,CAAc,EAAM,SAAS,CAAC,YAAY,EAAQ,CAAC,CAAI,EAAE,MAAM,CAAC,IAAI,QAAQ,QAAQ,OAAO,WAAW,SAAS,eAAe,gBAAgB,IAAI,GAAG,MAAM,OAAO,UAAU,aAAa,QAAQ,SAAS,OAAO,UAAU,WAAW,6BAA6B,WAAW,IAAI,SAAS,GAAG,cAAc,SAAS,WAAW,IAAI,cAAc,YAAY,MAAM,CAAS,EA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