export type AssetsTab = 'management' | 'upload' | 'theory' | 'insurance';

export interface AssetOrg {
  id: number;
  type: string;
  jurisdiction: string;
  area: string;
  name: string;
  address: string;
  vessel: number;
  skimmer: number;
  pump: number;
  vehicle: number;
  sprayer: number;
  totalAssets: number;
  phone: string;
  lat: number;
  lng: number;
  pinSize: 'hq' | 'lg' | 'md';
  equipment: { category: string; icon: string; count: number }[];
  contacts: { role: string; name: string; phone: string }[];
}

export interface InsuranceRow {
  shipName: string;
  mmsi: string;
  imo: string;
  insType: string;
  insurer: string;
  policyNo: string;
  start: string;
  expiry: string;
  limit: string;
}

export const typeTagCls = (type: string) => {
  if (type === '해경관할')
    return 'bg-[color-mix(in_srgb,var(--color-danger)_10%,transparent)] text-color-danger';
  if (type === '해경경찰서')
    return 'bg-[color-mix(in_srgb,var(--color-info)_10%,transparent)] text-color-info';
  if (type === '파출소')
    return 'bg-[color-mix(in_srgb,var(--color-success)_10%,transparent)] text-color-success';
  if (type === '관련기관')
    return 'bg-[color-mix(in_srgb,var(--color-tertiary)_10%,transparent)] text-color-tertiary';
  if (type === '해양환경공단')
    return 'bg-[color-mix(in_srgb,var(--color-accent)_10%,transparent)] text-color-accent';
  if (type === '업체')
    return 'bg-[color-mix(in_srgb,var(--color-warning)_10%,transparent)] text-color-warning';
  return 'bg-[color-mix(in_srgb,var(--color-info)_10%,transparent)] text-color-info';
};

export const typeColor = (type: string) => {
  switch (type) {
    case '해경관할':
      return { bg: 'rgba(6,182,212,0.3)', border: '#06b6d4', selected: '#22d3ee' };
    case '해경경찰서':
      return { bg: 'rgba(59,130,246,0.3)', border: '#3b82f6', selected: '#60a5fa' };
    case '파출소':
      return { bg: 'rgba(34,197,94,0.3)', border: '#22c55e', selected: '#4ade80' };
    case '관련기관':
      return { bg: 'rgba(168,85,247,0.3)', border: '#a855f7', selected: '#c084fc' };
    case '해양환경공단':
      return { bg: 'rgba(20,184,166,0.3)', border: '#14b8a6', selected: '#2dd4bf' };
    case '업체':
      return { bg: 'rgba(245,158,11,0.3)', border: '#f59e0b', selected: '#fbbf24' };
    case '지자체':
      return { bg: 'rgba(236,72,153,0.3)', border: '#ec4899', selected: '#f472b6' };
    case '기름저장시설':
      return { bg: 'rgba(139,92,246,0.3)', border: '#8b5cf6', selected: '#a78bfa' };
    case '정유사':
      return { bg: 'rgba(13,148,136,0.3)', border: '#0d9488', selected: '#2dd4bf' };
    case '해군':
      return { bg: 'rgba(100,116,139,0.3)', border: '#64748b', selected: '#94a3b8' };
    default:
      return { bg: 'rgba(107,114,128,0.3)', border: '#6b7280', selected: '#9ca3af' };
  }
};
