{"version":3,"file":"FAQAccordion.BAoNMS2W.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/t3XCqXFxrPGwUvSmzOvZ/nWk7noJRBNocc5qHdQIo/FAQAccordion.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,startTransition,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence,useInView}from\"framer-motion\";/**\n * FAQ Accordion Component - Only one item can be open at a time\n * \n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 400\n * \n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function FAQAccordion(props){const{items=[{question:\"Comment puis-je r\\xe9server un s\\xe9jour \\xe0 l'\\xe9tablissement ?\",answer:\"Vous pouvez r\\xe9server directement sur notre site web, par t\\xe9l\\xe9phone ou par email. Nous vous recommandons de r\\xe9server \\xe0 l'avance pour garantir la disponibilit\\xe9.\"},{question:\"Quelles sont les modalit\\xe9s de r\\xe9servation ?\",answer:\"Un acompte de 30% est demand\\xe9 \\xe0 la r\\xe9servation. Le solde est \\xe0 r\\xe9gler \\xe0 votre arriv\\xe9e. Nous acceptons les cartes bancaires et les virements.\"},{question:\"Quels sont les services et les prestations de l'\\xe9tablissement ?\",answer:\"Notre \\xe9tablissement propose un spa, un restaurant gastronomique, une piscine, et un service de conciergerie disponible 24h/24.\"},{question:\"Est-ce que l'\\xe9tablissement est proche du centre-ville ?\",answer:\"Oui, nous sommes situ\\xe9s \\xe0 seulement 10 minutes du centre-ville en voiture, avec un acc\\xe8s facile aux transports en commun.\"},{question:\"Est-ce qu'il est facile de garer sa voiture \\xe0 l'\\xe9tablissement ?\",answer:\"Nous disposons d'un parking priv\\xe9 gratuit pour nos clients, avec un service de voiturier disponible sur demande.\"}],backgroundColor=\"#EDE8E3\",itemBackgroundColor=\"transparent\",questionColor=\"#1A1A1A\",answerColor=\"#4A4A4A\",borderColor=\"#D4CFC8\",iconColor=\"#1A1A1A\",numberColor=\"#A8A39D\",questionFont,answerFont,numberFont,borderRadius=0,itemSpacing=0,style}=props;const[openIndex,setOpenIndex]=useState(null);const[isMobile,setIsMobile]=useState(false);const containerRef=useRef(null);const isInView=useInView(containerRef,{once:true,amount:.1});// Detect mobile viewport\nuseEffect(()=>{if(typeof window!==\"undefined\"){const checkMobile=()=>{startTransition(()=>{setIsMobile(window.innerWidth<768);});};checkMobile();window.addEventListener(\"resize\",checkMobile);return()=>window.removeEventListener(\"resize\",checkMobile);}},[]);const toggleItem=index=>{startTransition(()=>{setOpenIndex(openIndex===index?null:index);});};return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{...style,width:\"100%\",height:\"100%\",backgroundColor,padding:isMobile?\"20px\":\"40px\",display:\"flex\",flexDirection:\"column\",gap:\"0\",overflow:\"auto\",boxSizing:\"border-box\",maxWidth:\"1280px\",margin:\"0 auto\"},children:items.map((item,index)=>{const isOpen=openIndex===index;const numberLabel=`${String(index+1).padStart(2,\"0\")}.`;return /*#__PURE__*/_jsxs(motion.div,{initial:{opacity:0,x:-100},animate:isInView?{opacity:1,x:0}:{opacity:0,x:-100},transition:{duration:1.5,delay:index*.2,ease:[.16,1,.3,1]},style:{backgroundColor:itemBackgroundColor,borderRadius:\"0\",border:\"none\",borderBottom:`1px solid ${borderColor}`,overflow:\"hidden\",width:\"100%\",boxSizing:\"border-box\",marginBottom:\"0\",paddingTop:isMobile?\"20px\":\"24px\",paddingBottom:isMobile?\"20px\":\"24px\",position:\"relative\"},children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>toggleItem(index),style:{width:\"100%\",padding:\"0\",display:\"flex\",justifyContent:\"space-between\",alignItems:\"flex-start\",backgroundColor:\"transparent\",border:\"none\",cursor:\"pointer\",textAlign:\"left\",gap:isMobile?\"16px\":\"32px\",boxSizing:\"border-box\"},\"aria-expanded\":isOpen,children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"flex-start\",gap:isMobile?\"0\":\"32px\",flex:1,minWidth:0},children:[!isMobile&&/*#__PURE__*/_jsx(\"span\",{style:{color:numberColor,flexShrink:0,minWidth:\"60px\",paddingTop:\"4px\",...numberFont},children:numberLabel}),/*#__PURE__*/_jsx(\"span\",{style:{flex:1,color:questionColor,minWidth:0,wordWrap:\"break-word\",overflowWrap:\"break-word\",hyphens:\"auto\",...questionFont},children:item.question})]}),/*#__PURE__*/_jsx(motion.svg,{width:isMobile?\"20\":\"24\",height:isMobile?\"20\":\"24\",viewBox:\"0 0 24 24\",fill:\"none\",style:{flexShrink:0,minWidth:isMobile?\"20px\":\"24px\",marginTop:\"4px\"},animate:{rotate:isOpen?45:0},transition:{duration:.3,ease:\"easeInOut\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M12 5V19M5 12H19\",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:{paddingTop:isMobile?\"16px\":\"20px\",paddingLeft:isMobile?\"0\":\"92px\",paddingRight:\"0\",paddingBottom:\"0\",color:answerColor,wordWrap:\"break-word\",overflowWrap:\"break-word\",...answerFont},children:item.answer})})})]},index);})});}addPropertyControls(FAQAccordion,{items:{type:ControlType.Array,title:\"FAQ Items\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\",defaultValue:\"Comment puis-je r\\xe9server un s\\xe9jour \\xe0 l'\\xe9tablissement ?\",displayTextArea:true},answer:{type:ControlType.String,title:\"Answer\",defaultValue:\"Vous pouvez r\\xe9server directement sur notre site web, par t\\xe9l\\xe9phone ou par email.\",displayTextArea:true}}},defaultValue:[{question:\"Comment puis-je r\\xe9server un s\\xe9jour \\xe0 l'\\xe9tablissement ?\",answer:\"Vous pouvez r\\xe9server directement sur notre site web, par t\\xe9l\\xe9phone ou par email. Nous vous recommandons de r\\xe9server \\xe0 l'avance pour garantir la disponibilit\\xe9.\"},{question:\"Quelles sont les modalit\\xe9s de r\\xe9servation ?\",answer:\"Un acompte de 30% est demand\\xe9 \\xe0 la r\\xe9servation. Le solde est \\xe0 r\\xe9gler \\xe0 votre arriv\\xe9e. Nous acceptons les cartes bancaires et les virements.\"},{question:\"Quels sont les services et les prestations de l'\\xe9tablissement ?\",answer:\"Notre \\xe9tablissement propose un spa, un restaurant gastronomique, une piscine, et un service de conciergerie disponible 24h/24.\"},{question:\"Est-ce que l'\\xe9tablissement est proche du centre-ville ?\",answer:\"Oui, nous sommes situ\\xe9s \\xe0 seulement 10 minutes du centre-ville en voiture, avec un acc\\xe8s facile aux transports en commun.\"},{question:\"Est-ce qu'il est facile de garer sa voiture \\xe0 l'\\xe9tablissement ?\",answer:\"Nous disposons d'un parking priv\\xe9 gratuit pour nos clients, avec un service de voiturier disponible sur demande.\"}]},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#EDE8E3\"},itemBackgroundColor:{type:ControlType.Color,title:\"Item Background\",defaultValue:\"transparent\"},questionColor:{type:ControlType.Color,title:\"Question Color\",defaultValue:\"#1A1A1A\"},answerColor:{type:ControlType.Color,title:\"Answer Color\",defaultValue:\"#4A4A4A\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#D4CFC8\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#1A1A1A\"},numberColor:{type:ControlType.Color,title:\"Number Color\",defaultValue:\"#A8A39D\"},questionFont:{type:ControlType.Font,title:\"Question Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"28px\",variant:\"Regular\",letterSpacing:\"-0.02em\",lineHeight:\"1.3em\"}},answerFont:{type:ControlType.Font,title:\"Answer Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Regular\",letterSpacing:\"-0.01em\",lineHeight:\"1.6em\"}},numberFont:{type:ControlType.Font,title:\"Number Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"20px\",variant:\"Regular\",letterSpacing:\"0em\",lineHeight:\"1em\"}},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:0,min:0,max:24,step:1,unit:\"px\"},itemSpacing:{type:ControlType.Number,title:\"Item Spacing\",defaultValue:0,min:0,max:32,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQAccordion\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"400\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQAccordion.map"],"mappings":"8QAQG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,CAAC,SAAS,yDAAqE,OAAO,iKAAmL,CAAC,CAAC,SAAS,8CAAoD,OAAO,+IAAoK,CAAC,CAAC,SAAS,kEAAqE,OAAO,iIAAoI,CAAC,CAAC,SAAS,0DAA6D,OAAO,4HAAqI,CAAC,CAAC,SAAS,kEAAwE,OAAO,mHAAsH,CAAC,CAAC,kBAAgB,UAAU,sBAAoB,cAAc,gBAAc,UAAU,cAAY,UAAU,cAAY,UAAU,YAAU,UAAU,cAAY,UAAU,eAAa,aAAW,aAAW,eAAa,EAAE,cAAY,EAAE,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,KAAK,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAO,EAAaC,EAAO,KAAK,CAAO,EAAS,EAAU,EAAa,CAAC,KAAK,GAAK,OAAO,GAAG,CAAC,CAC5l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