{"version":3,"file":"SpoilerFAQ.CaKV8hU-.mjs","names":["useState","useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/gGZrNsFvh3HE9AlNiGK9/ZMWPWgKyxhLzgBM04Aj7/SpoilerFAQ.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useEffect,useRef,useLayoutEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function FAQList({faq1={question:\"\",answer:\"\"},faq2={question:\"\",answer:\"\"},faq3={question:\"\",answer:\"\"},faq4={question:\"\",answer:\"\"},faq5={question:\"\",answer:\"\"},faqs,desktopFontSize,tabletFontSize,phoneFontSize,desktopAnswerFontSize,tabletAnswerFontSize,phoneAnswerFontSize,useJSONLD=true,questionColor=\"#000\",answerColor=\"#333\",iconColor=\"#94A3B8\",separatorColor=\"#E2E8F0\",separatorThickness=1}){const[fontSize,setFontSize]=useState(desktopFontSize);const[answerFontSize,setAnswerFontSize]=useState(desktopAnswerFontSize);const[openIndex,setOpenIndex]=useState(null);const contentRefs=useRef([]);const toggleFAQ=index=>{setOpenIndex(openIndex===index?null:index);};useEffect(()=>{const handleResize=()=>{if(window.innerWidth>=1024){setFontSize(desktopFontSize);setAnswerFontSize(desktopAnswerFontSize);}else if(window.innerWidth>=810){setFontSize(tabletFontSize);setAnswerFontSize(tabletAnswerFontSize);}else{setFontSize(phoneFontSize);setAnswerFontSize(phoneAnswerFontSize);}};window.addEventListener(\"resize\",handleResize);handleResize();return()=>window.removeEventListener(\"resize\",handleResize);},[desktopFontSize,tabletFontSize,phoneFontSize,desktopAnswerFontSize,tabletAnswerFontSize,phoneAnswerFontSize]);const jsonLd={\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",mainEntity:faqs.map(faq=>({\"@type\":\"Question\",name:faq.question,acceptedAnswer:{\"@type\":\"Answer\",text:faq.answer}}))};const renderFaqs=()=>faqs.map((faq,index)=>{const isOpen=openIndex===index;useEffect(()=>{if(isOpen&&contentRefs.current[index]){contentRefs.current[index].style.maxHeight=contentRefs.current[index].scrollHeight+\"px\";}},[isOpen]);useLayoutEffect(()=>{if(openIndex!==null&&contentRefs.current[openIndex]){contentRefs.current[openIndex].style.maxHeight=contentRefs.current[openIndex].scrollHeight+\"px\";}},[openIndex]);return /*#__PURE__*/_jsxs(\"div\",{style:{borderTop:index===0?`${separatorThickness}px solid ${separatorColor}`:\"none\",borderBottom:`${separatorThickness}px solid ${separatorColor}`,paddingTop:\"25px\",paddingBottom:\"5px\",width:\"100%\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:questionContainerStyle,onClick:()=>toggleFAQ(index),children:[/*#__PURE__*/_jsx(\"h3\",{style:{...questionStyle,fontSize,color:questionColor},children:faq.question}),isOpen?/*#__PURE__*/_jsx(OpenedArrow,{color:iconColor}):/*#__PURE__*/_jsx(ClosedArrow,{color:iconColor})]}),/*#__PURE__*/_jsx(\"div\",{ref:el=>contentRefs.current[index]=el,style:{overflow:\"hidden\",transition:\"max-height 0.4s ease, opacity 0.3s ease\",maxHeight:isOpen?contentRefs.current[index]?.scrollHeight+\"px\":\"0px\",opacity:isOpen?1:0,paddingTop:isOpen?\"10px\":\"0px\",marginBottom:isOpen?\"30px\":\"0px\",fontSize:answerFontSize,color:answerColor,width:\"100%\"},children:/*#__PURE__*/_jsx(\"div\",{style:{margin:0},children:faq.answer})})]},index);});return useJSONLD?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:JSON.stringify(jsonLd)}}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",display:\"flex\",flexDirection:\"column\"},children:renderFaqs()})]}):/*#__PURE__*/_jsx(\"div\",{itemScope:true,itemType:\"https://schema.org/FAQPage\",children:renderFaqs()});}FAQList.defaultProps={faqs:[{question:\"Puis-je tester les produits ViaDialog ?\",answer:\"Oui, vous pouvez tester gratuitement les produits ViaDialog gr\\xe2ce \\xe0 nos versions de d\\xe9mo. Elles vous permettent d'explorer les fonctionnalit\\xe9s de base. Profitez de cette opportunit\\xe9 pour d\\xe9couvrir comment ViaDialog peut r\\xe9pondre \\xe0 vos besoins de mani\\xe8re efficace et professionnelle.\"},{question:\"Comment savoir si ViaDialog est la bonne solution ?\",answer:\"Si vous \\xeates en charge d'un service clients, nous avons de grandes chances d'avoir des solutions pertinentes, m\\xeame pour vos besoins les plus sp\\xe9cifiques. N'h\\xe9sitez pas \\xe0 demander conseil \\xe0 l'un de nos sp\\xe9cialistes produits pour discuter de votre projet et voir nos solutions en action.\"},{question:\"Proposez-vous une tarification sp\\xe9cifique pour les petites entreprises ?\",answer:\"Viadialog s'adapte \\xe0 vos besoins, quelle que soit la taille de votre entreprise.\"},{question:\"Proposez-vous des abonnements ou des contrats annuels ?\",answer:\"Oui, nous proposons des contrats annuels. Avec un contrat annuel, vous b\\xe9n\\xe9ficiez d'un acc\\xe8s continu \\xe0 notre plateforme et de tarifs optimis\\xe9s, offrant une solution pratique et avantageuse pour la gestion de vos centres de contacts. Contactez-nous directement pour discuter des d\\xe9tails de nos contrats annuels et d\\xe9couvrir les avantages sp\\xe9cifiques qu'ils peuvent vous offrir.\"},{question:\"Proposez-vous des tarifs pr\\xe9f\\xe9rentiels pour les partenaires int\\xe9grateurs ?\",answer:\"Oui, nous proposons des tarifs pr\\xe9f\\xe9rentiels pour les partenaires. Contactez-nous directement pour discuter de vos besoins, et nous serons ravis de vous fournir des informations sur nos tarifs avantageux et les conditions adapt\\xe9es \\xe0 votre activit\\xe9.\"}],desktopFontSize:\"20px\",tabletFontSize:\"18px\",phoneFontSize:\"16px\",desktopAnswerFontSize:\"16px\",tabletAnswerFontSize:\"13px\",phoneAnswerFontSize:\"13px\",questionColor:\"#000\",answerColor:\"#333\",useJSONLD:true,iconColor:\"#94A3B8\",separatorColor:\"#E2E8F0\",separatorThickness:1};addPropertyControls(FAQList,{faqs:{type:ControlType.Array,control:{type:ControlType.Object,title:\"FAQ\",controls:{question:{type:ControlType.String,title:\"Question\"},answer:{type:ControlType.RichText,title:\"R\\xe9ponse\"}}}},useJSONLD:{type:ControlType.Boolean,title:\"Use JSON-LD\",defaultValue:true},questionColor:{type:ControlType.Color,title:\"Couleur des titres\",defaultValue:\"#000\"},answerColor:{type:ControlType.Color,title:\"Couleur du texte\",defaultValue:\"#333\"},iconColor:{type:ControlType.Color,title:\"Couleur des ic\\xf4nes\",defaultValue:\"#94A3B8\"},separatorColor:{type:ControlType.Color,title:\"Couleur du trait\",defaultValue:\"#E2E8F0\"},separatorThickness:{type:ControlType.Number,title:\"\\xc9paisseur du trait\",defaultValue:1,min:.5,max:5,unit:\"px\"}});const questionContainerStyle={display:\"flex\",alignItems:\"center\",cursor:\"pointer\",marginBottom:\"20px\",width:\"100%\"};const questionStyle={margin:0,fontWeight:\"normal\",fontFamily:\"Inter, sans-serif\",flex:1,width:\"100%\"};const answerStyle={paddingLeft:\"34px\",paddingTop:\"0px\",color:\"#333\",fontFamily:\"Inter, sans-serif\",marginBottom:\"40px\",overflow:\"hidden\",transition:\"max-height 0.3s ease, opacity 0.3s ease\",maxHeight:0,opacity:0};//changement\nconst ClosedArrow=({color})=>/*#__PURE__*/_jsx(\"span\",{style:{fontSize:\"30px\",marginLeft:\"auto\",transition:\"transform 0.2s ease, opacity 0.2s ease\",opacity:1,transform:\"scale(1)\",color:color},children:\"+\"});const OpenedArrow=({color})=>/*#__PURE__*/_jsx(\"span\",{style:{fontSize:\"30px\",marginLeft:\"auto\",transition:\"transform 0.2s ease, opacity 0.2s ease\",opacity:1,transform:\"scale(1)\",color:color},children:\"−\"});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQList\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SpoilerFAQ.map"],"mappings":"4NAAgM,SAAwB,EAAQ,CAAC,OAAK,CAAC,SA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