"use client"; import {useState} from "react"; import ChevronLeftSvg from "../icons/ChevronLeftSvg"; import Image from "next/image"; import { default_info, PHONE_NUMBERS } from "@/constants"; interface AccordionProps { title: string; description: string; thumbnail: string; services: string; notes?: string | undefined; price: string; defaultOpen?: number; index: number; } export default function Accordion({ title, index, description, services, notes = "", thumbnail, price, defaultOpen, }: AccordionProps) { const [openIndex, setOpenIndex] = useState( defaultOpen ?? null ); const toggle = (index: number) => { setOpenIndex(openIndex === index ? null : index); }; return (
{openIndex === index && (
{thumbnail && (
)} {description && (
)} {services && ( <>

خدمات قابل ارائه به بيمار شامل:

)} {price && ( <>

قیمت پکیج ها:

)} {notes && ( <>

نکات مهم :

)} <>

)}
); }