import Image from "next/image";
import { DosDontsProps } from "../../../types/eye-emergencies";

export default function DosDonts({ title, heading, bottom_text, image, points }: DosDontsProps) {
  return (
    <section className="py-16 px-5 md:px-20 md:py-[120px]">
      <div className="container">
        <div className="grid grid-cols-1 md:grid-cols-2 gap-8 lg:gap-10">

          <div className="md:col-start-1 md:row-start-1">
            <span className="text-[12px] md:text-[14px] text-[#334D72] tracking-[0.5px] uppercase mb-2 block">
              {title}
            </span>
            <h2 className="text-[32px] md:text-[40px] text-[#00204F] font-medium leading-[1.1]">
              {heading}
            </h2>
          </div>

          <div className="md:col-start-2 md:row-span-3 md:row-start-1">
            <Image src={image} width={600} height={600} alt={"image"} className="w-full h-auto rounded-[16px]" />
          </div>

          <div className="md:col-start-1 md:row-start-2">
            {points?.map((item, index) => (
              <div key={index} className="mb-5">
                <h3 className="text-[18px] md:text-[20px] text-[#00204F] font-bold mb-3">{item.title}</h3>
                {item.notes?.map((note, noteIndex) => (
                  <div key={noteIndex} className="flex items-start gap-2 mb-3">
                    <img src={note.points_icon} alt="" className="w-6 h-6 mt-1 shrink-0" />
                    <p className="text-[16px] md:text-[18px] text-medium text-[#334D72]">{note.points_note}</p>
                  </div>
                ))}
              </div>
            ))}
            <p className="text-[14px] md:text-[16px] text-[#334D72] mt-4">{bottom_text}</p>
          </div>

        </div>
      </div>
    </section>
  );
}