// ═══ Korean Coastal CCTV Camera Data ═══
// Source: 국립해양조사원 KHOA TAGO

export interface CctvCamera {
  id: number;
  name: string;
  region: '제주' | '남해' | '서해' | '동해';
  lat: number;
  lng: number;
  type: 'tide' | 'fog';
  url: string;
  streamUrl: string;
  source: 'KHOA';
}

/** KHOA HLS 스트림 — 백엔드 프록시 경유 */
function khoa(site: string) { return `/api/kcg/cctv/hls/${site}/s.m3u8`; }

export const KOREA_CCTV_CAMERAS: CctvCamera[] = [
  // ═══ 서해 (West Sea) ═══
  { id: 1,  name: '인천항 조위관측소', region: '서해', lat: 37.450382, lng: 126.593028, type: 'tide', url: 'https://www.badatime.com/cctv/29', streamUrl: khoa('Incheon'), source: 'KHOA' },
  { id: 2,  name: '인천항 해무관측', region: '서해', lat: 37.379626, lng: 126.615917, type: 'fog', url: 'https://www.badatime.com/cctv/30', streamUrl: khoa('SeaFog_Incheon'), source: 'KHOA' },
  { id: 3,  name: '대산항 해무관측', region: '서해', lat: 36.978758, lng: 126.304908, type: 'fog', url: 'https://www.badatime.com/cctv/31', streamUrl: khoa('SeaFog_Daesan'), source: 'KHOA' },
  { id: 4,  name: '평택당진항 해무관측', region: '서해', lat: 37.113185, lng: 126.39375, type: 'fog', url: 'https://www.badatime.com/cctv/32', streamUrl: khoa('SeaFog_PTDJ'), source: 'KHOA' },

  // ═══ 남해 (South Sea) ═══
  { id: 5,  name: '목포항 해무관측', region: '남해', lat: 34.751831, lng: 126.310232, type: 'fog', url: 'https://www.badatime.com/cctv/35', streamUrl: khoa('SeaFog_Mokpo'), source: 'KHOA' },
  { id: 6,  name: '진도항 조위관측소', region: '남해', lat: 34.379541, lng: 126.307928, type: 'tide', url: 'https://www.badatime.com/cctv/36', streamUrl: khoa('Jindo'), source: 'KHOA' },
  { id: 7,  name: '여수항 해무관측', region: '남해', lat: 34.75386, lng: 127.752881, type: 'fog', url: 'https://www.badatime.com/cctv/37', streamUrl: khoa('SeaFog_Yeosu'), source: 'KHOA' },
  { id: 8,  name: '여수항 조위관측소', region: '남해', lat: 34.747005, lng: 127.766053, type: 'tide', url: 'https://www.badatime.com/cctv/38', streamUrl: khoa('Yeosu'), source: 'KHOA' },
  { id: 9,  name: '부산항 조위관측소', region: '남해', lat: 35.096329, lng: 129.034726, type: 'tide', url: 'https://www.badatime.com/cctv/39', streamUrl: khoa('Busan'), source: 'KHOA' },
  { id: 10, name: '부산항 해무관측', region: '남해', lat: 35.077924, lng: 129.081469, type: 'fog', url: 'https://www.badatime.com/cctv/40', streamUrl: khoa('SeaFog_Busan'), source: 'KHOA' },
  { id: 11, name: '해운대 해무관측', region: '남해', lat: 35.158148, lng: 129.158529, type: 'fog', url: 'https://www.badatime.com/cctv/41', streamUrl: khoa('SeaFog_Haeundae'), source: 'KHOA' },

  // ═══ 동해 (East Sea) ═══
  { id: 12, name: '울산항 해무관측', region: '동해', lat: 35.501902, lng: 129.387139, type: 'fog', url: 'https://www.badatime.com/cctv/42', streamUrl: khoa('SeaFog_Ulsan'), source: 'KHOA' },
  { id: 13, name: '포항항 해무관측', region: '동해', lat: 36.051325, lng: 129.378492, type: 'fog', url: 'https://www.badatime.com/cctv/43', streamUrl: khoa('SeaFog_Pohang'), source: 'KHOA' },
  { id: 14, name: '묵호항 조위관측소', region: '동해', lat: 37.550385, lng: 129.116396, type: 'tide', url: 'https://www.badatime.com/cctv/44', streamUrl: khoa('Mukho'), source: 'KHOA' },

  // ═══ 제주 (Jeju) ═══
  { id: 15, name: '모슬포항 조위관측소', region: '제주', lat: 33.213884, lng: 126.25051, type: 'tide', url: 'https://www.badatime.com/cctv/45', streamUrl: khoa('Moseulpo'), source: 'KHOA' },
];
