import {YogaAchivementsComponent_Plain} from "@/types/generated-strapi-interfaces/api/yoga-achivements-component";
import AchievementsItemComponent from "@/components/achievements.item.component";

export interface Props{
    config: YogaAchivementsComponent_Plain
}
export default function AchievementsComponent({
    config: {
        achievements,
        title,header,description
    }
                                              }: Props){
    console.info("achievements",achievements)
    return (
        <section className="achievement_section">
            <div className="container">
                <div className="row">
                    <div className="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                        <div className="achievement_content">
                            <h5>{title}</h5>
                            <h2>{header}</h2>
                            <p>{description}</p>
                        </div>
                    </div>
                </div>
                <div className="row" data-aos="fade-up">
                    {achievements && achievements.map( achievement => <AchievementsItemComponent  key={achievement.id} achievement={achievement} />)}
                </div>
            </div>
        </section>
        
    );

}
