import TextWithRightImage from "@/components/text.with.right.image.component";
import TextWithLeftImage from "@/components/text.with.right.left.component";
import {YogaTextWithImageComponent_Plain} from "@/types/generated-strapi-interfaces/api/yoga-text-with-image-component";

export interface Props{
    config: YogaTextWithImageComponent_Plain
}
export default function TextWithImageComponent({ config}: Props){
    const {imagePosition} = config || {};
    return (
        <>
            { imagePosition ==   'Right' && <TextWithRightImage  config={config} /> }
            { imagePosition ==   'Left' && <TextWithLeftImage config={config}  /> }
        </>
    );
}
