// 扩展战区与打击数据（2026-03-03 态势）
// 仅用于前端展示，不参与任何真实评估

export const EXTENDED_WAR_ZONES = {
  // 1. 霍尔木兹海峡交战区 — 伊朗国境线沿岸（波斯湾→海峡→阿曼湾）+ 阿曼穆桑代姆 + 波斯湾出口 [lng, lat]
  hormuzCombatZone: {
    type: 'Feature' as const,
    properties: {
      name: '霍尔木兹海峡交战区',
      name_en: 'Strait of Hormuz Area',
      status: 'BLOCKED / ENGAGED',
      style: {
        fillColor: '#FFD700',
        fillOpacity: 0.4,
        meshPattern: 'diagonal-line',
      },
    },
    geometry: {
      type: 'Polygon' as const,
      coordinates: [
        [
          [55.92, 27.02],    // 波斯湾入口（伊朗西侧，近阿联酋水道）
          [56.12, 27.08],    // 伊朗沿岸向东
          [56.27, 27.18],    // 阿巴斯港一带（伊朗国境线）
          [56.35, 27.05],    // 格什姆岛西北侧伊朗主陆
          [56.28, 26.92],    // 格什姆岛北缘（伊朗海岸）
          [56.45, 26.88],    // 格什姆东侧水道（伊朗岸）
          [56.62, 26.78],    // 伊朗沿岸向东
          [56.88, 26.58],    // 米纳布方向（伊朗海岸）
          [57.08, 26.42],    // 锡里克（Sirik）附近伊朗国境线
          [57.38, 25.88],    // 库角（Ras al Kuh）前
          [57.52, 25.72],    // 库角（Ras al Kuh）
          [57.77, 25.64],    // 贾斯克（Jask）— 阿曼湾开口伊朗侧
          [56.26, 25.61],    // 迪巴（Dibba）— 阿曼湾开口阿曼侧
          [56.34, 25.92],    // 穆桑代姆东海岸
          [56.38, 26.18],    // 穆桑代姆东海岸
          [56.4, 26.35],     // 拉斯·穆桑代姆最北端
          [56.24, 26.22],    // 穆桑代姆西侧狭窄水道
          [56.08, 26.0],     // 穆桑代姆西海岸
          [55.96, 26.05],    // 波斯湾出口（阿曼/阿联酋侧）
          [55.92, 27.02],    // 闭合：回到起点
        ],
      ],
    },
  },

  // 霍尔木兹区域标注点（多边形中心附近，用于显示文字）
  hormuzLabelCenter: [56.5, 26.35] as [number, number],

  // 2. 真主党势力范围 (Hezbollah) — 黎巴嫩南部 + 贝卡谷地，多边形 [lng, lat]
  hezbollahZone: {
    type: 'Feature' as const,
    properties: {
      name: '真主党势力范围',
      status: 'OFFENSIVE ACTIVE',
      color: '#32CD32',
    },
    geometry: {
      type: 'MultiPolygon' as const,
      coordinates: [
        // 黎巴嫩南部（利塔尼河以南）
        [
          [
            [35.05, 33.05],
            [35.45, 33.15],
            [35.85, 33.35],
            [35.95, 33.65],
            [35.75, 33.95],
            [35.35, 33.85],
            [35.05, 33.55],
            [35.05, 33.05],
          ],
        ],
        // 贝卡谷地
        [
          [
            [35.85, 33.75],
            [36.15, 33.85],
            [36.45, 34.05],
            [36.55, 34.35],
            [36.35, 34.55],
            [35.95, 34.45],
            [35.75, 34.15],
            [35.85, 33.75],
          ],
        ],
      ],
    },
  },

  // 真主党区域标注点（用于显示文字）
  hezbollahLabelCenter: [35.7, 33.7] as [number, number],

  /** 苏丹武装标注点（地图上「苏丹武装」文字位置；国境由 countries 源 filter Sudan 绘制） */
  sudanLabelCenter: [30.5, 15.25] as [number, number],

  // 库尔德武装势力区域标注点（叙/土/伊三区紫色带中心附近）
  kurdishLabelCenter: [43.5, 36.3] as [number, number],

  // 真主党打击源（黎巴嫩境内多处，随机选取作为攻击起点）[lng, lat]
  hezbollahStrikeSource: [35.32, 33.28] as [number, number],
  /** 黎巴嫩境内攻击源（提尔、西顿、巴勒贝克、贝鲁特南郊、纳巴提耶等），用于黎巴嫩→以色列动画 */
  lebanonStrikeSources: [
    [35.19, 33.27], // 提尔 Tyre
    [35.37, 33.56], // 西顿 Sidon
    [36.2, 34.01],  // 巴勒贝克 Baalbek
    [35.5, 33.86],  // 贝鲁特南郊 Dahieh
    [35.38, 33.38], // 纳巴提耶 Nabatiyeh
    [35.85, 33.85], // 贝卡谷地
  ] as [number, number][],

  // 3. 真主党当前攻击目标 (North Israel Targets)
  activeAttacks: [
    {
      name: 'Meron Intelligence Base',
      coords: [35.41, 32.99] as [number, number],
      type: 'Rocket Strike',
      damage: 'High',
    },
    {
      name: 'Ramat David Airbase',
      coords: [35.18, 32.66] as [number, number],
      type: 'Drone Swarm',
      damage: 'Moderate',
    },
    {
      name: 'Mishmar HaCarmel (Haifa)',
      coords: [35.01, 32.76] as [number, number],
      type: 'Precision Missile',
      damage: 'Intercepted',
    },
  ],
} as const

/** 跨国库尔德势力范围与钳形攻势 — 土(Bakur)/叙(Rojava)/伊(Bashur) 三区 + 北/南钳形箭头 */

const SYRIA_ROJAVA: [number, number][] = [
  [36.0, 36.5],
  [42.3, 37.1],
  [42.0, 35.0],
  [39.0, 34.5],
  [38.0, 35.5],
  [36.0, 36.5],
]
const TURKEY_BAKUR: [number, number][] = [
  [39.5, 38.5],
  [44.5, 38.2],
  [44.8, 37.0],
  [42.5, 37.0],
  [40.0, 37.5],
  [39.5, 38.5],
]
const IRAQ_BASHUR: [number, number][] = [
  [42.5, 37.2],
  [45.0, 37.3],
  [46.2, 35.8],
  [45.5, 34.5],
  [43.5, 34.8],
  [42.5, 36.0],
  [42.5, 37.2],
]

/** 北/中/南三线进攻轴线起止点 [lng, lat]，供生长动画与固定几何使用 */
export const PINCER_AXES = [
  { start: [43.6, 37.2] as [number, number], end: [46.27, 38.08] as [number, number], name: 'North Pincer (Tabriz)' },
  { start: [45.0, 35.4] as [number, number], end: [46.99, 35.31] as [number, number], name: 'Central Pincer (Sanandaj)' },
  { start: [45.6, 35.2] as [number, number], end: [47.07, 34.31] as [number, number], name: 'South Pincer (Kermanshah)' },
] as const

/** 以色列进攻黎巴嫩轴线 [lng, lat]：以色列北部 → 黎巴嫩南部/真主党势力方向 */
export const ISRAEL_LEBANON_AXIS = {
  start: [35.25, 32.95] as [number, number],
  end: [35.55, 33.45] as [number, number],
  name: 'Israel → Lebanon',
} as const

/** 伊朗被库尔德武装进攻点防御线：大不里士→萨南达季→克尔曼沙赫，黄色虚线 */
export const KURDISH_ATTACK_DEFENSE_LINE: GeoJSON.Feature<GeoJSON.LineString> = {
  type: 'Feature',
  properties: { name: '伊朗西部防御线' },
  geometry: {
    type: 'LineString',
    coordinates: [
      [46.27, 38.08],
      [46.99, 35.31],
      [47.07, 34.31],
    ],
  },
}

/** 三叉戟 18 点一笔画固定几何（不回头路径、槽位 t 小于主尖），与 PINCER_AXES 顺序一致：北 / 中 / 南 */
export const PINCER_TRIDENT_RINGS: [number, number][][] = [
  [ // 北线 (Tabriz) — 彻底修复版
    [43.45, 37.55], [43.75, 36.95], [43.85, 37.05], [43.55, 37.65],
    [44.40, 37.35],
    [45.10, 37.15], [46.15, 37.60], [45.40, 37.55],
    [44.80, 37.70],
    [45.50, 37.85], [46.27, 38.08], [45.40, 38.00],
    [44.75, 37.95],
    [45.05, 38.25], [46.00, 38.45], [45.20, 38.15],
    [44.35, 37.60],
    [43.45, 37.55],
  ],
  [
    [44.95, 35.70], [45.05, 35.10], [45.15, 35.15], [45.05, 35.75],
    [45.60, 35.25], [46.20, 35.10], [46.85, 35.15], [46.20, 35.25],
    [45.85, 35.31], [46.40, 35.25], [46.99, 35.31], [46.40, 35.38],
    [45.85, 35.45], [46.25, 35.55], [46.80, 35.65], [46.25, 35.45],
    [45.65, 35.55], [44.95, 35.70],
  ],
  [
    [45.85, 35.45], [45.35, 34.95], [45.45, 35.05], [45.95, 35.55],
    [46.05, 34.85], [46.45, 34.50], [46.95, 34.15], [46.50, 34.35],
    [46.25, 34.45], [46.65, 34.35], [47.07, 34.31], [46.75, 34.55],
    [46.35, 34.75], [46.65, 34.85], [47.15, 34.65], [46.55, 34.95],
    [46.30, 35.15], [45.85, 35.45],
  ],
]

export const KURDISH_FRONT_GEOJSON: GeoJSON.FeatureCollection = {
  type: 'FeatureCollection',
  features: [
    {
      type: 'Feature',
      properties: {
        name: 'Kurdish Tactical Range (Bakur / Rojava / Bashur)',
        region_type: 'InfluenceZone',
        description: '叙利亚东北部(SDF)、土耳其东南部、伊拉克 KRG 自治区，紫色弧形地带向 Rojhelat 钳形攻势',
      },
      geometry: {
        type: 'MultiPolygon',
        coordinates: [[SYRIA_ROJAVA], [TURKEY_BAKUR], [IRAQ_BASHUR]],
      },
    },
    {
      type: 'Feature',
      properties: {
        name: '大不里士 (Tabriz)',
        region_type: 'Target',
        status: 'Obj: CRITICAL',
        showMarker: false,
      },
      geometry: { type: 'Point', coordinates: [46.27, 38.08] },
    },
    {
      type: 'Feature',
      properties: {
        name: '萨南达季 (Sanandaj)',
        region_type: 'Target',
        status: 'Obj: HIGH',
        showMarker: true,
      },
      geometry: { type: 'Point', coordinates: [46.99, 35.31] },
    },
    {
      type: 'Feature',
      properties: {
        name: '克尔曼沙赫 (Kermanshah)',
        region_type: 'Target',
        status: 'Obj: STRATEGIC',
        showMarker: true,
      },
      geometry: { type: 'Point', coordinates: [47.07, 34.31] },
    },
  ],
}

// 战损评估点位（以色列打击黎巴嫩 & 联军打击伊朗本土）
export const STRIKE_DAMAGE_ASSESSMENT = {
  lebanonFront: [
    {
      id: 'L1',
      name: 'Dahieh Command',
      coords: [35.5, 33.86] as [number, number],
      type: 'Leadership',
      color: '#ff4d4d',
    },
    {
      id: 'L2',
      name: 'Litani Ammo Depot',
      coords: [35.32, 33.34] as [number, number],
      type: 'Logistics',
      color: '#ff4d4d',
    },
    {
      id: 'L3',
      name: 'Baalbek Logistics Hub',
      coords: [36.2, 34.01] as [number, number],
      type: 'Logistics',
      color: '#ffb84d',
    },
    {
      id: 'L4',
      name: 'Tyre Coastal Battery',
      coords: [35.19, 33.27] as [number, number],
      type: 'Naval',
      color: '#ffb84d',
    },
    {
      id: 'L5',
      name: 'Hermel UAV Site',
      coords: [36.38, 34.39] as [number, number],
      type: 'UAV',
      color: '#ffd84d',
    },
  ],
  iranMainland: [
    {
      id: 'I1',
      name: 'Parchin Military Complex',
      coords: [51.76, 35.53] as [number, number],
      type: 'Strategic',
      severity: 'Critical',
      marker: 'Explosion',
    },
    {
      id: 'I2',
      name: 'Mehrabad Airbase',
      coords: [51.31, 35.68] as [number, number],
      type: 'Airbase',
      severity: 'High',
      marker: 'Runway',
    },
    {
      id: 'I3',
      name: 'Hesa Aircraft Factory',
      coords: [51.59, 32.92] as [number, number],
      type: 'Industrial',
      severity: 'Moderate',
      marker: 'Factory',
    },
    {
      id: 'I4',
      name: 'Natanz Enrichment Entrance',
      coords: [51.91, 33.72] as [number, number],
      type: 'Nuclear',
      severity: 'Critical',
      marker: 'Radiation',
    },
    {
      id: 'I5',
      name: 'Bushehr Air Defense Net',
      coords: [50.88, 28.82] as [number, number],
      type: 'AirDefense',
      severity: 'High',
      marker: 'Radar',
    },
    {
      id: 'I6',
      name: 'Shahid Rajaee Port',
      coords: [56.12, 27.14] as [number, number],
      type: 'Naval',
      severity: 'Critical',
      marker: 'Blocked',
    },
    {
      id: 'I7',
      name: 'Kermanshah Silo Cluster',
      coords: [47.16, 34.35] as [number, number],
      type: 'Missile',
      severity: 'Critical',
      marker: 'Silo',
    },
    {
      id: 'I8',
      name: 'Tabriz Tactical Airbase 2',
      coords: [46.24, 38.12] as [number, number],
      type: 'Airbase',
      severity: 'High',
      marker: 'Runway',
    },
    {
      id: 'I9',
      name: 'Arak Heavy Water Support',
      coords: [49.23, 34.11] as [number, number],
      type: 'Nuclear',
      severity: 'High',
      marker: 'Power',
    },
    {
      id: 'I10',
      name: 'Fordow Entrance',
      coords: [50.99, 34.88] as [number, number],
      type: 'Nuclear',
      severity: 'Critical',
      marker: 'Tunnel',
    },
    {
      id: 'I11',
      name: 'Nojeh Airbase',
      coords: [48.8, 35.21] as [number, number],
      type: 'Airbase',
      severity: 'High',
      marker: 'Runway',
    },
    {
      id: 'I12',
      name: 'Kish SIGINT Site',
      coords: [53.98, 26.54] as [number, number],
      type: 'Radar',
      severity: 'Moderate',
      marker: 'Sensor',
    },
  ],
} as const

