import { BASE_URL } from "@/Constant";
import Image from "next/image";
import SafeHtmlRenderer from "../SafeHtmlRenderer";

export default function Initiative({ data }: any) {
  return (
    <div className="w-full max-w-7xl mx-auto p-4">
      <div className="relative border  rounded-3xl p-8 md:p-12">
        <div className="flex flex-col lg:flex-row gap-8 items-center">
          {/* Content Section */}
          <div className="flex-1 space-y-6">
            <h2>
              {data?.postTitle}
            </h2>
            <div className="safe">
              <SafeHtmlRenderer htmlContent={data?.shortContent} />
            </div>
          </div>

          <div className="md:w-[40%] ">
            <div className="bg-white rounded-2xl p-4 shadow-lg">
              <div className="grid grid-cols-1 gap-4">
                <div className="aspect-square rounded-lg overflow-hidden">
                  <Image
                    width={100}
                    height={100}
                    unoptimized={true}
                    src={`${BASE_URL}${data?.gallaryImage}`}
                    alt="Digital transformation concept"
                    className="w-full h-full object-cover"
                  />
                </div>
              </div>
            </div>
          </div>
        </div>
        
      </div>
    </div>
  );
}
