interface LocationMapProps {
    latitude: number;
    longitude: number;
    height?: string;
    zoom?: number;
}

export function LocationMap({
    latitude,
    longitude,
    height = '250px',
    zoom = 17,
}: LocationMapProps) {
    const src = `https://maps.google.com/maps?q=${latitude},${longitude}&z=${zoom}&t=k&output=embed`;

    return (
        <iframe
            src={src}
            style={{ height, width: '100%', border: 0 }}
            className="rounded-lg"
            loading="lazy"
            referrerPolicy="no-referrer-when-downgrade"
            title="Lokasi Presensi"
        />
    );
}
