import React from 'react';
import { View, StyleSheet } from 'react-native';
import Svg, { Path, Rect, Circle } from 'react-native-svg';

export default function SecurityIllustration({ size = 180 }: { size?: number }) {
  const scale = size / 200;
  return (
    <View style={[styles.container, { width: size, height: size * 0.75 }]}>
      <Svg width={size} height={size * 0.75} viewBox="0 0 200 150" fill="none">
        {/* Soft blue background shape / blobs */}
        <Path
          d="M35 85C20 85 15 65 30 55C45 45 65 50 75 60C85 70 50 85 35 85Z"
          fill="#93C5FD"
          opacity={0.8}
        />
        <Path
          d="M130 35C145 35 155 45 150 55C145 65 130 65 125 55C120 45 115 35 130 35Z"
          fill="#93C5FD"
          opacity={0.8}
        />
        <Path
          d="M40 100C40 65 70 45 105 45C140 45 160 70 155 100C150 115 110 115 40 100Z"
          fill="#A5F3FC"
          opacity={0.9}
        />

        {/* Suitcase (Black luggage sitting behind right side of shield) */}
        <Rect x="125" y="65" width="30" height="42" rx="6" fill="#0A0F1D" />
        {/* Suitcase Handle */}
        <Rect x="134" y="56" width="12" height="10" rx="2" stroke="#0A0F1D" strokeWidth="3.5" fill="none" />
        {/* Suitcase Straps / Accents */}
        <Rect x="125" y="77" width="30" height="4" fill="#FFFFFF" opacity={0.8} />
        {/* Suitcase Wheels */}
        <Circle cx="132" cy="109" r="3" fill="#0A0F1D" />
        <Circle cx="148" cy="109" r="3" fill="#0A0F1D" />

        {/* Shield Outer Container (Dark Navy) */}
        <Circle cx="95" cy="72" r="36" fill="#0C1C3E" />

        {/* Inner Shield (Bright Blue) */}
        <Path
          d="M95 50C106 50 114 53 114 62C114 78 95 89 95 89C95 89 76 78 76 62C76 53 84 50 95 50Z"
          fill="#00A3FF"
        />

        {/* Keyhole inside Shield */}
        <Circle cx="95" cy="64" r="4" fill="#0C1C3E" />
        <Path d="M93 66H97L98 74H92L93 66Z" fill="#0C1C3E" />
      </Svg>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    alignItems: 'center',
    justifyContent: 'center',
    marginVertical: 12,
  },
});
