{"version":3,"file":"FAQ_Code.Bk9AKcZE.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/1hoIlPOXH0Lh5GF9KYk1/uRzn1PmGR7S2t4RR0Shb/FAQ_Code.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function VerticalFAQ(props){const{questions,answers,textColor,mutedColor,dividerColor,maxAnswerHeight,animationSpeed,questionSizeDesktop,questionSizeTablet,questionSizeMobile,answerSizeDesktop,answerSizeTablet,answerSizeMobile,questionWeight,answerWeight}=props;const[active,setActive]=React.useState(-1);const getWidth=()=>typeof window!==\"undefined\"?window.innerWidth:1200;const[viewportWidth,setViewportWidth]=React.useState(getWidth);React.useEffect(()=>{const onResize=()=>setViewportWidth(getWidth());onResize();window.addEventListener(\"resize\",onResize);return()=>window.removeEventListener(\"resize\",onResize);},[]);const isDesktop=viewportWidth>=1200;const isTablet=viewportWidth>=810&&viewportWidth<=1199;const questionSize=isDesktop?questionSizeDesktop:isTablet?questionSizeTablet:questionSizeMobile;const answerSize=isDesktop?answerSizeDesktop:isTablet?answerSizeTablet:answerSizeMobile;const toggle=index=>{setActive(index===active?-1:index);};return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",background:\"transparent\"},children:questions.map((q,i)=>{const isOpen=active===i;return /*#__PURE__*/_jsxs(\"div\",{onClick:()=>toggle(i),style:{padding:\"20px 0\",borderBottom:i<questions.length-1?`1.5px solid ${dividerColor}`:\"none\",cursor:\"pointer\",background:\"transparent\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",paddingRight:4,paddingLeft:4},children:[/*#__PURE__*/_jsx(\"div\",{style:{color:textColor,fontSize:questionSize,fontWeight:questionWeight,lineHeight:1.2},children:q}),/*#__PURE__*/_jsx(\"div\",{style:{color:mutedColor,fontSize:questionSize+2,lineHeight:1,marginLeft:12},children:isOpen?\"−\":\"+\"})]}),/*#__PURE__*/_jsx(\"div\",{style:{maxHeight:isOpen?maxAnswerHeight:0,overflow:\"hidden\",transition:`max-height ${animationSpeed}s ease`},children:/*#__PURE__*/_jsx(\"div\",{style:{paddingTop:12,paddingLeft:4,paddingRight:4,color:mutedColor,fontSize:answerSize,fontWeight:answerWeight,lineHeight:1.5,opacity:isOpen?1:0,transform:isOpen?\"translateY(0px)\":\"translateY(-6px)\",transition:`opacity ${animationSpeed}s ease, transform ${animationSpeed}s ease`},children:answers[i]})})]},i);})});}addPropertyControls(VerticalFAQ,{questions:{type:ControlType.Array,title:\"Questions\",propertyControl:{type:ControlType.String},defaultValue:[\"Who is eligible?\",\"How do I join?\",\"What is included?\",\"Can I cancel?\",\"Do you offer family plans?\"]},answers:{type:ControlType.Array,title:\"Answers\",propertyControl:{type:ControlType.String},defaultValue:[\"Anyone over this age qualifies. There is no long process required.\",\"Join online or visit the front desk for assistance.\",\"You get access to classes, training spaces, and support.\",\"Yes, you can cancel with your standard notice period.\",\"Yes, we offer multi member and household options.\"]},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#ffffff\"},mutedColor:{type:ControlType.Color,title:\"Muted\",defaultValue:\"#b3b3b3\"},dividerColor:{type:ControlType.Color,title:\"Divider\",defaultValue:\"rgba(255,255,255,0.2)\"},questionSizeDesktop:{type:ControlType.Number,title:\"Q Size D\",defaultValue:18,min:10,max:48},questionSizeTablet:{type:ControlType.Number,title:\"Q Size T\",defaultValue:16,min:10,max:48},questionSizeMobile:{type:ControlType.Number,title:\"Q Size M\",defaultValue:16,min:10,max:48},answerSizeDesktop:{type:ControlType.Number,title:\"A Size D\",defaultValue:16,min:10,max:36},answerSizeTablet:{type:ControlType.Number,title:\"A Size T\",defaultValue:16,min:10,max:36},answerSizeMobile:{type:ControlType.Number,title:\"A Size M\",defaultValue:14,min:10,max:36},questionWeight:{type:ControlType.Number,title:\"Q Weight\",defaultValue:450,min:300,max:800,step:50},answerWeight:{type:ControlType.Number,title:\"A Weight\",defaultValue:400,min:300,max:800,step:50},maxAnswerHeight:{type:ControlType.Number,title:\"Max Height\",defaultValue:200,min:50,max:600},animationSpeed:{type:ControlType.Number,title:\"Speed\",defaultValue:.35,min:.1,max:1,step:.05}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VerticalFAQ\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQ_Code.map"],"mappings":"kMAAyI,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,YAAU,UAAQ,YAAU,aAAW,eAAa,kBAAgB,iBAAe,sBAAoB,qBAAmB,qBAAmB,oBAAkB,mBAAiB,mBAAiB,iBAAe,gBAAc,EAAW,CAAC,EAAO,GAAWA,EAAe,GAAG,CAAO,MAAoB,IAAS,OAA8B,KAAlB,EAAO,WAAqB,CAAC,EAAc,GAAkBA,EAAe,EAAS,CAAC,MAAoB,CAAC,IAAM,MAAa,EAAiB,GAAU,CAAC,CAAuD,OAAtD,GAAU,CAAC,EAAO,iBAAiB,SAAS,EAAS,KAAW,EAAO,oBAAoB,SAAS,EAAS,EAAG,EAAE,CAAC,CAAC,IAAM,EAAU,GAAe,KAAW,EAAS,GAAe,KAAK,GAAe,KAAW,EAAa,EAAU,EAAoB,EAAS,EAAmB,EAAyB,EAAW,EAAU,EAAkB,EAAS,EAAiB,EAAuB,EAAO,GAAO,CAAC,EAAU,IAAQ,EAAO,GAAG,EAAM,EAAG,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,cAAc,SAAS,WAAW,cAAc,CAAC,SAAS,EAAU,KAAK,EAAE,IAAI,CAAC,IAAM,EAAO,IAAS,EAAE,OAAoB,EAAM,MAAM,CAAC,YAAY,EAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,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