import type { SpaceUtilityPanelId } from '../model/types';

export const ANCHOR_ICON = {
  sound: (
    <svg
      viewBox="0 0 24 24"
      fill="none"
      className="h-4 w-4"
      stroke="currentColor"
      strokeWidth="1.8"
      strokeLinecap="round"
      strokeLinejoin="round"
    >
      <path d="M4 13V11a2 2 0 0 1 2-2h2l3-3h2v12h-2l-3-3H6a2 2 0 0 1-2-2Z" />
      <path d="M16 9a4 4 0 0 1 0 6" />
    </svg>
  ),
  notes: (
    <svg
      viewBox="0 0 24 24"
      fill="none"
      className="h-4 w-4"
      stroke="currentColor"
      strokeWidth="1.8"
      strokeLinecap="round"
      strokeLinejoin="round"
    >
      <path d="M6 4h9l3 3v13H6z" />
      <path d="M15 4v4h4" />
      <path d="M9 12h6M9 16h4" />
    </svg>
  ),
};

export const RAIL_ICON = {
  controlCenter: (
    <svg
      viewBox="0 0 24 24"
      fill="none"
      className="h-4 w-4"
      stroke="currentColor"
      strokeWidth="1.8"
      strokeLinecap="round"
      strokeLinejoin="round"
    >
      <path d="M4 7h16M4 12h16M4 17h16" />
      <circle cx="8" cy="7" r="1.2" fill="currentColor" stroke="none" />
      <circle cx="16" cy="12" r="1.2" fill="currentColor" stroke="none" />
      <circle cx="11" cy="17" r="1.2" fill="currentColor" stroke="none" />
    </svg>
  ),
  inbox: (
    <svg
      viewBox="0 0 24 24"
      fill="none"
      className="h-4 w-4"
      stroke="currentColor"
      strokeWidth="1.8"
      strokeLinecap="round"
      strokeLinejoin="round"
    >
      <rect x="4" y="6" width="16" height="12" rx="2.5" />
      <path d="m5 8 7 5 7-5" />
    </svg>
  ),
};

export const UTILITY_PANEL_TITLE: Record<SpaceUtilityPanelId, string> = {
  'control-center': 'Quick Controls',
  inbox: '인박스',
  paywall: 'PRO',
  'manage-plan': '플랜 관리',
};

export const formatThoughtCount = (count: number) => {
  if (count < 1) {
    return '0';
  }

  if (count > 9) {
    return '9+';
  }

  return String(count);
};
