{"version":3,"file":"FAQ_Code.BvxG1xf6.mjs","names":["React.useState","React.useId","__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","ce","init_jsx_runtime","c","p","_e","ie","addPropertyControls","init_framer_B1b760uK","ControlType","VerticalFAQ","props","active","setActive","uid","getWidth","viewportWidth","setViewportWidth","onResize","isDesktop","isTablet","questionSize","questionSizeDesktop","questionSizeTablet","questionSizeMobile","answerSize","answerSizeDesktop","answerSizeTablet","answerSizeMobile","toggle","index","questions","isOpen","i","dividerColor","textColor","questionWeight","q","mutedColor","maxAnswerHeight","animationSpeed","answerWeight","answers","init_FAQ_Code"],"sources":["https:/framerusercontent.com/modules/1hoIlPOXH0Lh5GF9KYk1/XtL5ZCaTIqKTJej4K45F/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);// Ties each question button to its answer for screen readers.\nconst uid=React.useId();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__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",background:\"transparent\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`.hci-vfaq-q:focus-visible{outline:2px solid #fff;outline-offset:4px;border-radius:4px}`}),questions.map((q,i)=>{const isOpen=active===i;return /*#__PURE__*/_jsxs(\"div\",{style:{padding:\"20px 0\",borderBottom:i<questions.length-1?`1.5px solid ${dividerColor}`:\"none\",background:\"transparent\"},children:[/*#__PURE__*/_jsxs(\"button\",{type:\"button\",className:\"hci-vfaq-q\",id:`${uid}-q${i}`,\"aria-expanded\":isOpen,\"aria-controls\":`${uid}-a${i}`,onClick:()=>toggle(i),style:{display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",width:\"100%\",margin:0,border:0,background:\"transparent\",font:\"inherit\",textAlign:\"left\",cursor:\"pointer\",paddingTop:0,paddingBottom:0,paddingRight:4,paddingLeft:4},children:[/*#__PURE__*/_jsx(\"div\",{style:{color:textColor,fontSize:questionSize,fontWeight:questionWeight,lineHeight:1.2},children:q}),/*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{color:mutedColor,fontSize:questionSize+2,lineHeight:1,marginLeft:12},children:isOpen?\"−\":\"+\"})]}),/*#__PURE__*/_jsx(\"div\",{id:`${uid}-a${i}`,role:\"region\",\"aria-labelledby\":`${uid}-q${i}`,\"aria-hidden\":!isOpen,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,// Line breaks typed in an answer show as line breaks.\nwhiteSpace:\"pre-line\",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":"A,6MAAyI,SAAwBe,EAAY,EAAM,CAAC,GAAK,CAAC,YAAU,UAAQ,YAAU,aAAW,eAAa,kBAAgB,iBAAe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