{"version":3,"file":"QuestionAnswerAccordion.1HVoNZTO.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/s24vQLuwIBpQvGI3SaPM/ifc4iJb93JGspNTNTwfA/QuestionAnswerAccordion.js"],"sourcesContent":["// Single question and answer accordion FAQ component with CMS field support\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";/**\n * FAQ Accordion Item\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function QuestionAnswerAccordion(props){const{question=\"What is your question?\",answer=\"This is where your answer content will appear when the accordion is expanded.\",questionFont,answerFont,questionColor,answerColor,backgroundColor,borderColor,iconColor,defaultOpen=false}=props;const[isOpen,setIsOpen]=useState(defaultOpen);const toggleAccordion=()=>{startTransition(()=>{setIsOpen(!isOpen);});};return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",backgroundColor,borderBottom:`1px solid ${borderColor}`,overflow:\"hidden\"},children:[/*#__PURE__*/_jsxs(\"button\",{onClick:toggleAccordion,style:{width:\"100%\",display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",padding:\"32px 0\",backgroundColor:\"transparent\",border:\"none\",cursor:\"pointer\",textAlign:\"left\",gap:\"24px\"},\"aria-expanded\":isOpen,children:[/*#__PURE__*/_jsx(\"span\",{style:{flex:1,color:questionColor,...questionFont},children:question}),/*#__PURE__*/_jsx(motion.div,{animate:{rotate:isOpen?180:0},transition:{duration:.3,ease:\"easeInOut\"},style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0},children:/*#__PURE__*/_jsx(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M6 9L12 15L18 9\",stroke:iconColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})})]}),/*#__PURE__*/_jsx(AnimatePresence,{initial:false,children:isOpen&&/*#__PURE__*/_jsx(motion.div,{initial:{height:0,opacity:0},animate:{height:\"auto\",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:\"easeInOut\"},style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{paddingBottom:\"32px\",color:answerColor,...answerFont},children:answer})})})]});}addPropertyControls(QuestionAnswerAccordion,{question:{type:ControlType.String,title:\"Question\",defaultValue:\"What is your question?\",displayTextArea:false},answer:{type:ControlType.String,title:\"Answer\",defaultValue:\"This is where your answer content will appear when the accordion is expanded.\",displayTextArea:true},questionFont:{type:ControlType.Font,title:\"Question Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"32px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},answerFont:{type:ControlType.Font,title:\"Answer Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Regular\",letterSpacing:\"-0.01em\",lineHeight:\"1.5em\"}},questionColor:{type:ControlType.Color,title:\"Question Color\",defaultValue:\"#000000\"},answerColor:{type:ControlType.Color,title:\"Answer Color\",defaultValue:\"#000000\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#EEEEEE\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#000000\"},defaultOpen:{type:ControlType.Boolean,title:\"Default State\",defaultValue:false,enabledTitle:\"Open\",disabledTitle:\"Closed\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"QuestionAnswerAccordion\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"vari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