/** * FAQ List component for mobile */ import React, { useState } from 'react'; import { View, Text } from 'react-native'; import { FAQItem } from './FAQItem'; import type { FAQListProps } from '../types'; export function FAQList({ items, translations }: FAQListProps) { const [expandedId, setExpandedId] = useState( items.length > 0 ? items[0].id : null ); function toggleItem(id: string) { setExpandedId(expandedId === id ? null : id); } if (items.length === 0) { return ( {translations.faq.noItems} ); } return ( {items.map((item) => ( toggleItem(item.id)} /> ))} ); }