2026-11-03 12:24:43 +05:30
'use client' ;
import React , { useState } from 'react' ;
2026-11-03 13:16:16 +05:30
import { ChevronDown , HelpCircle } from 'lucide-react' ;
2026-11-03 12:24:43 +05:30
import { resolveLocalised } from '@/types' ;
2026-11-04 17:55:18 +05:30
import { TextAnimate } from '@/components/magicui/text-animate' ;
2026-11-03 12:24:43 +05:30
interface FaqSectionProps {
title? : any ;
items? : Array < {
q : string ;
a : string ;
} > ;
locale? : string ;
}
export function FaqSection ({
2026-11-04 17:55:18 +05:30
title = 'Frequently Asked Questions' ,
2026-11-03 12:24:43 +05:30
items = [],
locale = 'en' ,
} : FaqSectionProps ) {
const [ openIndex , setOpenIndex ] = useState < number | null >( 0 );
2026-11-04 17:55:18 +05:30
const resolvedTitle = resolveLocalised ( title , locale ) || 'Frequently Asked Questions' ;
2026-11-03 12:24:43 +05:30
2026-11-04 17:55:18 +05:30
const defaultItems = [
{
q : 'Do you store or retain uploaded user photos?' ,
a : 'Never. CRE Innovations enforces a strict Zero-Retention Policy. All photo inferences occur synchronously in volatile GPU memory and the enhanced image is streamed straight back to your browser session. No images are saved on disk or remote servers.' ,
},
{
q : 'Can I try all tools free on the web without an account?' ,
a : 'Yes! Every visitor gets 5 free trials each day per tool without registering or providing an email address. For high volume batch editing and unlimited processing, download our native mobile apps.' ,
},
{
q : 'How does the handoff to the mobile app work?' ,
a : 'Each tool has a dedicated Home Mobile App. When you want to continue editing on your phone, click "Get the App" or scan the dynamically generated QR code on desktop to jump directly into the app with a 50 free credit welcome bonus.' ,
},
{
q : 'What image formats and file sizes are supported?' ,
a : 'We accept JPEG, PNG, and WebP images up to 12MB. The engine performs lossless reconstruction returning studio-quality 4K resolutions.' ,
},
];
const displayItems = items && items . length > 0 ? items : defaultItems ;
2026-11-03 12:24:43 +05:30
return (
2026-11-04 18:37:52 +05:30
< section id = "faq" className = "py-14 sm:py-20 bg-[#FAF8F5] border-t border-slate-900/[0.06] relative overflow-hidden" >
{ /* Symbolic Elemental Ambient Highlights */ }
< div
className = "absolute inset-0 pointer-events-none -z-10"
style = {{
background : 'radial-gradient(circle at 50% 30%, rgba(37,99,235,0.04) 0%, transparent 60%)' ,
}}
/>
2026-11-04 18:05:26 +05:30
< div className = "max-w-5xl mx-auto px-4 sm:px-6 md:px-8 lg:px-10" >
2026-11-04 17:55:18 +05:30
< div className = "text-center max-w-3xl mx-auto mb-14 space-y-3" >
< div className = "inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full bg-blue-50 border border-blue-200 text-xs font-mono font-semibold text-blue-700" >
2026-11-03 13:16:16 +05:30
< HelpCircle className = "w-3.5 h-3.5 text-blue-600" />
< span > TRANSPARENCY & ASSURANCE </ span >
</ div >
2026-11-04 17:55:18 +05:30
2026-11-04 18:05:26 +05:30
< h2 className = "text-3xl sm:text-5xl font-display font-extrabold text-slate-900 tracking-tight text-balance" >
2026-11-04 17:55:18 +05:30
< TextAnimate animation = "slideLeft" by = "character" >
{ resolvedTitle }
</ TextAnimate >
</ h2 >
2026-11-04 18:05:26 +05:30
< p className = "text-sm sm:text-base text-slate-600 font-sans text-pretty" >
2026-11-04 17:55:18 +05:30
< TextAnimate animation = "fadeIn" by = "word" delay = { 0.15 }>
Everything you need to know about our browser trial and privacy guarantees .
</ TextAnimate >
</ p >
2026-11-03 13:16:16 +05:30
</ div >
2026-11-03 12:24:43 +05:30
2026-11-03 13:16:16 +05:30
< div className = "space-y-4" >
2026-11-04 17:55:18 +05:30
{ displayItems . map (( item , idx ) => {
2026-11-03 12:24:43 +05:30
const isOpen = openIndex === idx ;
return (
< div
key = { idx }
2026-11-04 18:48:24 +05:30
className = "rounded-2xl border border-slate-200/90 bg-white overflow-hidden shadow-cream-sm hover:border-blue-300 transition-[border-color] duration-300 ease-[cubic-bezier(0.16,1,0.3,1)]"
2026-11-03 12:24:43 +05:30
>
< button
2026-11-04 17:55:18 +05:30
type = "button"
2026-11-03 12:24:43 +05:30
onClick = {() => setOpenIndex ( isOpen ? null : idx )}
2026-11-04 18:48:24 +05:30
className = "w-full p-6 text-left flex items-center justify-between gap-4 font-bold text-slate-900 hover:text-blue-600 transition-colors duration-200"
2026-11-03 12:24:43 +05:30
>
2026-11-04 17:55:18 +05:30
< span className = "text-base sm:text-lg font-display" >{ item . q }</ span >
2026-11-03 12:24:43 +05:30
< ChevronDown
2026-11-04 18:48:24 +05:30
className = { `w-5 h-5 text-slate-400 shrink-0 transition-transform duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] ${
2026-11-03 12:24:43 +05:30
isOpen ? 'rotate-180 text-blue-600' : ''
} ` }
/>
</ button >
{ isOpen && (
2026-11-04 17:55:18 +05:30
< div className = "px-6 pb-6 text-sm text-slate-600 leading-relaxed border-t border-slate-100 pt-4 font-sans font-normal animate-fadeIn" >
2026-11-03 12:24:43 +05:30
{ item . a }
</ div >
)}
</ div >
);
})}
</ div >
</ div >
</ section >
);
}