import YogaImageComponent from "@/components/yoga.image.component";
import {
    YogaAboutUsComponent,
    YogaAboutUsComponent_Plain
} from "@/types/generated-strapi-interfaces/api/yoga-about-us-component";
import {StrapiFile} from "@/types/types";
import strapiApi from "@/api/strapi/strapi-api";

export interface Props{
     data: YogaAboutUsComponent_Plain
}
const AboutUsComponent = ( {data: {title,header,description,content,buttonText,buttonLink, image}}: Props) =>{
    const fileImage = image as StrapiFile;
    return (
        <section className="aboutus_section">
            <div className="container">
                <div className="row">
                    <div className="col-lg-7 col-md-7 col-sm-12 col-xs-12">
                        <div className="aboutus_image">
                            <figure className="mb-0"><YogaImageComponent src={strapiApi.getImageUrl(fileImage.url)} alt="" className="img-fluid"/></figure>
                        </div>
                        <figure className="aboutus_top_shape left_shape mb-0">
                            <YogaImageComponent src="/assets/images/aboutus_top_shape.png" alt="" className="img-fluid"/>
                        </figure>
                        <figure className="aboutus_bottom_shape left_shape mb-0">
                            <YogaImageComponent src="/assets/images/aboutus_bottom_shape.png" alt="" className="img-fluid"/>
                        </figure>
                    </div>
                    <div className="col-lg-5 col-md-5 col-sm-12 col-xs-12" data-aos="fade-right">
                        <div className="aboutus_content">
                            <h5>{title}</h5>
                            <h2>{header}</h2>
                            <p>{description}</p>
                            <div className="aboutus_line_wrapper">
                                <h6>{content}</h6>
                                <figure className="mb-0 purple_line"><YogaImageComponent src="/assets/images/aboutus_line.png" alt="" className="img-fluid" /></figure>
                            </div>
                            <div className="btn_wrapper">
                                <a href={buttonLink} className="text-decoration-none get_started_btn">{buttonText}</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    );
}

export default AboutUsComponent;
