{"version":3,"file":"FAQSection.8bO7_dDP.mjs","names":["React.useMemo","React.useState","React.useCallback"],"sources":["https:/framerusercontent.com/modules/sWVcXow4npKGOfcDF9Hj/vhlDluVeJknW7I1MRRd0/FAQSection.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{AnimatePresence,motion}from\"framer-motion\";/**\n * Instructions:\n * Create a Framer component that follows the Framer component rules and achieves the user's goal.\n * recreate this:\n *//**\n * @framerIntrinsicWidth 900\n * @framerIntrinsicHeight 420\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function FAQSection(props){const isStatic=useIsStaticRenderer();const{eyebrow,title,items,maxWidth,paddingY,paddingX,headingGap,itemPaddingY,backgroundColor,eyebrowColor,titleColor,questionColor,answerColor,dividerColor,iconColor,eyebrowFont,titleFont,questionFont,answerFont,allowMultipleOpen,firstOpen,style}=props;const safeItems=Array.isArray(items)&&items.length>0?items:[];const initialOpen=React.useMemo(()=>{if(!firstOpen)return new Set;if(safeItems.length===0)return new Set;return new Set([0]);},[firstOpen,safeItems.length]);const[openSet,setOpenSet]=React.useState(initialOpen);React.useEffect(()=>{React.startTransition(()=>{setOpenSet(initialOpen);});// eslint-disable-next-line react-hooks/exhaustive-deps\n},[firstOpen,safeItems.length]);const toggle=React.useCallback(index=>{React.startTransition(()=>{setOpenSet(prev=>{const next=new Set(prev);const isOpen=next.has(index);if(allowMultipleOpen){if(isOpen)next.delete(index);else next.add(index);return next;}next.clear();if(!isOpen)next.add(index);return next;});});},[allowMultipleOpen]);const rootStyle={position:\"relative\",width:\"100%\",height:\"100%\",background:backgroundColor,display:\"flex\",justifyContent:\"center\",alignItems:\"flex-start\",boxSizing:\"border-box\",...style};const contentStyle={width:\"100%\",maxWidth,paddingTop:paddingY,paddingBottom:paddingY,paddingLeft:paddingX,paddingRight:paddingX,boxSizing:\"border-box\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",gap:headingGap};const listStyle={width:\"100%\",boxSizing:\"border-box\",marginTop:8,borderTop:`1px solid ${dividerColor}`};return /*#__PURE__*/_jsx(\"section\",{style:rootStyle,\"aria-label\":\"Frequently asked questions\",children:/*#__PURE__*/_jsxs(\"div\",{style:contentStyle,children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",gap:10,textAlign:\"center\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{...eyebrowFont,color:eyebrowColor,letterSpacing:eyebrowFont?.letterSpacing??\"-0.01em\",width:\"max-content\"},children:eyebrow}),/*#__PURE__*/_jsx(\"div\",{style:{...titleFont,color:titleColor,width:\"100%\"},children:title})]}),/*#__PURE__*/_jsx(\"div\",{style:listStyle,role:\"list\",children:safeItems.map((item,i)=>{const isOpen=openSet.has(i);const qId=`faq-q-${i}`;const aId=`faq-a-${i}`;return /*#__PURE__*/_jsxs(\"div\",{role:\"listitem\",style:{width:\"100%\",borderBottom:`1px solid ${dividerColor}`,boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsxs(\"button\",{id:qId,type:\"button\",onClick:()=>toggle(i),\"aria-expanded\":isOpen,\"aria-controls\":aId,style:{width:\"100%\",appearance:\"none\",WebkitAppearance:\"none\",border:\"none\",background:\"transparent\",paddingTop:itemPaddingY,paddingBottom:itemPaddingY,paddingLeft:0,paddingRight:0,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"flex-start\",gap:10,textAlign:\"left\",boxSizing:\"border-box\",outline:\"none\"},children:[/*#__PURE__*/_jsx(PlusIcon,{color:iconColor,open:isOpen,staticRender:isStatic}),/*#__PURE__*/_jsx(\"span\",{style:{...questionFont,color:questionColor,flex:1,lineHeight:questionFont?.lineHeight??\"1.2em\"},children:item.question})]}),/*#__PURE__*/_jsx(AnimatePresence,{initial:false,children:isOpen&&item.answer?.trim()?/*#__PURE__*/_jsx(motion.div,{id:aId,role:\"region\",\"aria-labelledby\":qId,initial:isStatic?false:{height:0,opacity:0},animate:isStatic?{height:\"auto\",opacity:1}:{height:\"auto\",opacity:1},exit:isStatic?{height:0,opacity:0}:{height:0,opacity:0},transition:isStatic?{duration:0}:{duration:.22,ease:\"easeOut\"},style:{overflow:\"hidden\",paddingLeft:24,paddingRight:0,paddingBottom:itemPaddingY,boxSizing:\"border-box\"},children:/*#__PURE__*/_jsx(\"div\",{style:{...answerFont,color:answerColor,lineHeight:answerFont?.lineHeight??\"1.5em\",whiteSpace:\"pre-wrap\"},children:item.answer})},\"answer\"):null})]},i);})})]})});}function PlusIcon({color,open,staticRender}){const size=14;const stroke=2;const verticalStyle={position:\"absolute\",left:\"50%\",top:\"50%\",width:stroke,height:size,background:color,transform:`translate(-50%, -50%) scaleY(${open?0:1})`,transformOrigin:\"center\",transition:staticRender?undefined:\"transform 180ms ease\",borderRadius:99};const horizontalStyle={position:\"absolute\",left:\"50%\",top:\"50%\",width:size,height:stroke,background:color,transform:\"translate(-50%, -50%)\",borderRadius:99};return /*#__PURE__*/_jsxs(\"span\",{\"aria-hidden\":\"true\",style:{position:\"relative\",width:16,height:16,flex:\"0 0 16px\",display:\"inline-block\"},children:[/*#__PURE__*/_jsx(\"span\",{style:horizontalStyle}),/*#__PURE__*/_jsx(\"span\",{style:verticalStyle})]});}addPropertyControls(FAQSection,{eyebrow:{type:ControlType.String,title:\"Eyebrow\",defaultValue:\"What You Need To Know\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Frequently Asked Questions\"},items:{type:ControlType.Array,title:\"Items\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\",defaultValue:\"Question\"},answer:{type:ControlType.String,title:\"Answer\",defaultValue:\"Add an answer here. Leave empty to keep it collapsed-only.\",displayTextArea:true}}},defaultValue:[{question:\"What Is Pressure Washing Used For?\",answer:\"Pressure washing removes dirt, mold, and buildup from exterior surfaces like siding, driveways, patios, and decks.\"},{question:\"What Are the Benefits of Pressure Washing?\",answer:\"It improves curb appeal, helps prevent damage, and prepares surfaces for painting or sealing.\"},{question:\"Is Pressure Washing Safe For All Surfaces?\",answer:\"Not always. Softer materials may need lower pressure or soft washing to avoid damage.\"},{question:\"How Much Does Pressure Washing Cost?\",answer:\"Pricing varies by area and surface size. Request a quote for an accurate estimate.\"},{question:\"When Is Todd’s Pressure Washing Open For Business?\",answer:\"Set your hours here, or link to a contact page for scheduling.\"}]},maxWidth:{type:ControlType.Number,title:\"Max Width\",defaultValue:980,min:320,max:1600,step:10,unit:\"px\"},paddingY:{type:ControlType.Number,title:\"Padding Y\",defaultValue:42,min:0,max:160,step:1,unit:\"px\"},paddingX:{type:ControlType.Number,title:\"Padding X\",defaultValue:46,min:0,max:160,step:1,unit:\"px\"},headingGap:{type:ControlType.Number,title:\"Heading Gap\",defaultValue:20,min:0,max:80,step:1,unit:\"px\"},itemPaddingY:{type:ControlType.Number,title:\"Item Padding\",defaultValue:12,min:6,max:40,step:1,unit:\"px\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},eyebrowColor:{type:ControlType.Color,title:\"Eyebrow\",defaultValue:\"#6FA8FF\"},titleColor:{type:ControlType.Color,title:\"Title\",defaultValue:\"#000000\"},questionColor:{type:ControlType.Color,title:\"Question\",defaultValue:\"#0B2B5A\"},answerColor:{type:ControlType.Color,title:\"Answer\",defaultValue:\"#333333\"},dividerColor:{type:ControlType.Color,title:\"Divider\",defaultValue:\"#D9D9D9\"},iconColor:{type:ControlType.Color,title:\"Icon\",defaultValue:\"#1E6BFF\"},eyebrowFont:{type:ControlType.Font,title:\"Eyebrow Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"12px\",variant:\"Semibold\",letterSpacing:\"0em\",lineHeight:\"1em\",textAlign:\"center\"}},titleFont:{type:ControlType.Font,title:\"Title Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"44px\",variant:\"Bold\",letterSpacing:\"-0.03em\",lineHeight:\"1em\",textAlign:\"center\"}},questionFont:{type:ControlType.Font,title:\"Question Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"13px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\",textAlign:\"left\"}},answerFont:{type:ControlType.Font,title:\"Answer Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"13px\",variant:\"Regular\",letterSpacing:\"-0.01em\",lineHeight:\"1.5em\",textAlign:\"left\"}},allowMultipleOpen:{type:ControlType.Boolean,title:\"Multi Open\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},firstOpen:{type:ControlType.Boolean,title:\"First Open\",defaultValue:false,enabledTitle:\"Open\",disabledTitle:\"Closed\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQSection\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"420\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"900\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQSection.map"],"mappings":"6QAUG,SAAwB,EAAW,EAAM,CAAC,IAAM,EAAS,GAAqB,CAAM,CAAC,UAAQ,QAAM,QAAM,WAAS,WAAS,WAAS,aAAW,eAAa,kBAAgB,eAAa,aAAW,gBAAc,cAAY,eAAa,YAAU,cAAY,YAAU,eAAa,aAAW,oBAAkB,YAAU,SAAO,EAAY,EAAU,MAAM,QAAQ,EAAM,EAAE,EAAM,OAAO,EAAE,EAAM,EAAE,CAAO,EAAYA,MAAsB,CAAC,GAA4B,EAAU,SAAS,EAAS,IAAI,IAAW,IAAI,IAAI,CAAC,EAAE,CAAC,CAAG,CAAC,EAAU,EAAU,OAAO,CAAC,CAAM,CAAC,EAAQ,GAAYC,EAAe,EAAY,CAAC,M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