{"version":3,"file":"FAQItem.DckTrSIV.mjs","names":["useState","__esmMin","te","_e","p","c","init_jsx_runtime","ce","init_npm_react_18_3_1","motion","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_DymZktPS","ControlType","FAQItem","props","open","setOpen","defaultOpen","transition","animationDuration","SMOOTH_EASE","divider","dividerThickness","dividerColor","style","paddingX","showTopDivider","showBottomDivider","FONT","o","chevronGap","headerPaddingY","questionFont","questionColor","question","chevronSize","chevronColor","questionAnswerGap","answerPaddingBottom","answerFont","answerColor","answer","init_FAQItem"],"sources":["https:/framerusercontent.com/modules/MRu4ibB57VXTZIiPHs2Y/zwRKkPata3Z2McB0cYfY/FAQItem.js"],"sourcesContent":["// Camp House — FAQ item (single accordion row).\n// User request:\n// - Just the ITEM (not the whole block); it will be duplicated inside a frame.\n// - Open / closed states with a smooth animation (height + chevron rotation).\n// - Property controls for paddings, gaps, fonts and colors, clearly named, described in\n//   English and organised logically.\n//   (Outfit is the inherited base font; pick a family per role in the Font controls.)\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{useState,useEffect,startTransition}from\"react\";const FONT=\"'Outfit', sans-serif\";const SMOOTH_EASE=[.32,.72,0,1];/**\n * FAQ Item\n *\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 96\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function FAQItem(props){const{question,answer,defaultOpen,questionFont,answerFont,background,questionColor,answerColor,chevronColor,dividerColor,paddingX,headerPaddingY,chevronGap,chevronSize,questionAnswerGap,answerPaddingBottom,showTopDivider,showBottomDivider,dividerThickness,animationDuration,style}=props;const[open,setOpen]=useState(defaultOpen);// Keep the displayed state in sync with the control (so toggling \"Open by default\"\n// in Framer previews the open / closed state on the canvas).\nuseEffect(()=>{startTransition(()=>setOpen(defaultOpen));},[defaultOpen]);const transition={duration:animationDuration,ease:SMOOTH_EASE};const divider=`${dividerThickness}px solid ${dividerColor}`;return /*#__PURE__*/_jsxs(\"div\",{style:{...style,width:\"100%\",boxSizing:\"border-box\",background,paddingLeft:paddingX,paddingRight:paddingX,borderTop:showTopDivider?divider:\"none\",borderBottom:showBottomDivider?divider:\"none\",fontFamily:FONT},children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>setOpen(o=>!o),\"aria-expanded\":open,style:{width:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:chevronGap,padding:`${headerPaddingY}px 0`,margin:0,border:\"none\",background:\"transparent\",cursor:\"pointer\",textAlign:\"left\",appearance:\"none\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{...questionFont,color:questionColor},children:question}),/*#__PURE__*/_jsx(motion.span,{animate:{rotate:open?180:0},transition:transition,style:{display:\"inline-flex\",flex:\"none\",width:chevronSize,height:chevronSize},children:/*#__PURE__*/_jsx(\"svg\",{width:chevronSize,height:chevronSize,viewBox:\"0 0 24 24\",fill:\"none\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M6 9l6 6 6-6\",stroke:chevronColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})})]}),/*#__PURE__*/_jsx(motion.div,{initial:false,animate:{height:open?\"auto\":0,opacity:open?1:0},transition:transition,style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{paddingTop:questionAnswerGap,paddingBottom:answerPaddingBottom,...answerFont,color:answerColor,whiteSpace:\"pre-line\"},children:answer})})]});}addPropertyControls(FAQItem,{// === CONTENT ============================================================\nquestion:{type:ControlType.String,title:\"Question\",description:\"The FAQ question shown in the header row.\",defaultValue:\"What is Camphouse?\"},answer:{type:ControlType.String,title:\"Answer\",description:\"The answer revealed when the item is open.\",defaultValue:\"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla.\",displayTextArea:true},defaultOpen:{type:ControlType.Boolean,title:\"Open by Default\",description:\"Whether this item starts open. Use it to set the open / closed state per duplicated item.\",defaultValue:false,enabledTitle:\"Open\",disabledTitle:\"Closed\"},// === TYPOGRAPHY =========================================================\nquestionFont:{type:ControlType.Font,title:\"Question Font\",controls:\"extended\",defaultFontType:\"sans-serif\",description:\"Font of the question.\",defaultValue:{fontSize:28,variant:\"Medium\",lineHeight:\"130%\",letterSpacing:\"-0.01em\"}},answerFont:{type:ControlType.Font,title:\"Answer Font\",controls:\"extended\",defaultFontType:\"sans-serif\",description:\"Font of the answer text.\",defaultValue:{fontSize:18,variant:\"Regular\",lineHeight:\"150%\",letterSpacing:\"0em\"}},// === COLORS =============================================================\nbackground:{type:ControlType.Color,title:\"Background\",description:\"Item background.\",defaultValue:\"rgba(0,0,0,0)\"},questionColor:{type:ControlType.Color,title:\"Question\",description:\"Colour of the question text.\",defaultValue:\"#061F2B\"},answerColor:{type:ControlType.Color,title:\"Answer\",description:\"Colour of the answer text.\",defaultValue:\"#30434A\"},chevronColor:{type:ControlType.Color,title:\"Chevron\",description:\"Colour of the open / close chevron.\",defaultValue:\"#4D756E\"},dividerColor:{type:ControlType.Color,title:\"Divider\",description:\"Colour of the top / bottom divider lines.\",defaultValue:\"#E2E6E7\"},// === LAYOUT & SPACING ===================================================\npaddingX:{type:ControlType.Number,title:\"Padding (X)\",description:\"Left and right padding of the item.\",defaultValue:0,min:0,max:120,step:2,unit:\"px\"},headerPaddingY:{type:ControlType.Number,title:\"Header Padding (Y)\",description:\"Top and bottom padding of the question row (its height).\",defaultValue:28,min:4,max:80,step:2,unit:\"px\"},chevronGap:{type:ControlType.Number,title:\"Question → Chevron Gap\",description:\"Minimum space between the question and the chevron.\",defaultValue:16,min:0,max:80,step:2,unit:\"px\"},chevronSize:{type:ControlType.Number,title:\"Chevron Size\",description:\"Size of the chevron icon.\",defaultValue:24,min:12,max:48,step:2,unit:\"px\"},questionAnswerGap:{type:ControlType.Number,title:\"Question → Answer Gap\",description:\"Space between the question row and the answer when open.\",defaultValue:4,min:0,max:60,step:2,unit:\"px\"},answerPaddingBottom:{type:ControlType.Number,title:\"Answer Bottom Padding\",description:\"Space below the answer before the bottom divider.\",defaultValue:28,min:0,max:100,step:2,unit:\"px\"},showTopDivider:{type:ControlType.Boolean,title:\"Top Divider\",description:\"Show a divider line above the item (useful so stacked items have a line between each).\",defaultValue:true},showBottomDivider:{type:ControlType.Boolean,title:\"Bottom Divider\",description:\"Show a divider line below the item (e.g. enable on the last item).\",defaultValue:false},dividerThickness:{type:ControlType.Number,title:\"Divider Thickness\",description:\"Thickness of the divider lines.\",defaultValue:1,min:0,max:8,step:1,unit:\"px\"},// === ANIMATION ==========================================================\nanimationDuration:{type:ControlType.Number,title:\"Animation Duration\",description:\"Duration of the open / close animation (seconds).\",defaultValue:.4,min:.1,max:1.2,step:.05,unit:\"s\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQItem\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicHeight\":\"96\",\"framerIntrinsicWidth\":\"800\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQItem.map"],"mappings":"A,gPAeG,SAAwBc,EAAQ,EAAM,CAAC,GAAK,CAAC,WAAS,SAAO,cAAY,eAAa,aAAW,aAAW,gBAAc,cAAY,eAAa,eAAa,WAAS,iBAAe,aAAW,cAAY,oBAAkB,sBAAoB,iBAAe,oBAAkB,mBAAiB,oBAAkB,SAAOC,EAAW,CAACC,EAAKC,GAASjB,EAASkB,CAAW,EAEjXX,MAAc,CAACL,MAAoBe,EAAQC,CAAW,CAAC,CAAE,EAAE,CAACA,CAAW,CAAC,EAAE,IAAMC,EAAW,CAAC,SAASC,EAAkB,KAAKC,CAAW,EAAQC,EAAQ,GAAGC,EAAiB,WAAWC,IAAe,MA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