import { H2, H6, P, } from "@/components/ui/typography"
import { useTranslations } from "next-intl"
import { DadycarChallengeCard } from "@/components/ui/cards"
import { MainLogo } from "@/components/ui/Logos"

interface IDadycarChallengesSection {
    content: {
        title: string,
        subTitle?: string,
        challenges: {
            problem: string,
            problemDescription: string,
            sollution: string,
            sollutionDescription: string,
        }[]
    }
}

const DadycarChallengesSection = ({ content }: IDadycarChallengesSection) => {
    const t = useTranslations()

    return (
        <div className=" flex flex-col gap-16 justify-center items-center">
            <div className="flex flex-col gap-2 text-center">
                <H2>{t(content.title)}</H2>
                {content.subTitle && <P>{t(content.subTitle)}</P>}
            </div>
            <ul className="flex flex-col gap-12 lg:gap-6 ">
                <li className=" flex items-center justify-around max-sm:hidden ">
                    <H6 className='text-muted-foreground border border-dashed  w-fit px-4 py-2 text-center border-gray-400' >{t("Without DadyCar")}</H6>
                    <div className=" flex items-center gap-4">
                        <H6 className="text-muted-foreground">{t("with")}</H6>
                        <MainLogo />
                    </div>
                </li>
                {
                    content.challenges.map((challenge, index) => (
                        <DadycarChallengeCard key={index} challenge={challenge} />
                    ))
                }
            </ul>
        </div>
    )
}

export default DadycarChallengesSection
