/**
 * Line-art icons for the six service pillars.
 *
 * The current site references six PNG icons that now 404 on its CDN (they render
 * as broken 0x0 images there), so these are drawn inline instead — no extra
 * request, and they inherit the gold accent on hover.
 */

type IconProps = { className?: string };

const base = {
  viewBox: "0 0 48 48",
  fill: "none",
  stroke: "currentColor",
  strokeWidth: 1.1,
  strokeLinecap: "round" as const,
  strokeLinejoin: "round" as const,
  "aria-hidden": true,
};

/** توسعه دهنده — tower blocks under development */
function Development({ className }: IconProps) {
  return (
    <svg {...base} className={className}>
      <path d="M7 41h34" />
      <path d="M12 41V19l11-6v28" />
      <path d="M23 41V24l13 5v12" />
      <path d="M16 24h3M16 30h3M16 36h3M27 31h4M27 36h4" />
      <path d="M23 13V7" />
    </svg>
  );
}

/** سرمایه گذاری — value growth */
function Investment({ className }: IconProps) {
  return (
    <svg {...base} className={className}>
      <path d="M7 40h34" />
      <path d="M11 40V28M20 40V21M29 40V31M38 40V15" />
      <path d="M10 20l9-7 8 5 12-10" />
      <path d="M32 8h7v7" />
    </svg>
  );
}

/** طراحی و معماری — drafting compass over a plan */
function Architecture({ className }: IconProps) {
  return (
    <svg {...base} className={className}>
      <circle cx="24" cy="10" r="3" />
      <path d="M22 13 13 39M26 13l9 26" />
      <path d="M18 28h12" />
      <path d="M9 39h6M33 39h6" />
    </svg>
  );
}

/** مدیریت ساخت و ساز — safety helmet */
function Management({ className }: IconProps) {
  return (
    <svg {...base} className={className}>
      <path d="M8 32a16 16 0 0 1 32 0" />
      <path d="M5 32h38v4H5z" />
      <path d="M19 17.5V10h10v7.5" />
      <path d="M24 10v-.5" />
      <path d="M14 36v4h20v-4" />
    </svg>
  );
}

/** اجرا و نظارت — verified checklist */
function Supervision({ className }: IconProps) {
  return (
    <svg {...base} className={className}>
      <path d="M31 8h5a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H12a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h5" />
      <path d="M18 6h12v5H18z" />
      <path d="M16 22h9M16 29h9" />
      <path d="M29 27.5l2.5 2.5 5-5" />
    </svg>
  );
}

/** طراحی و اجرا دکوراسیون — seating and floor lamp */
function Interior({ className }: IconProps) {
  return (
    <svg {...base} className={className}>
      <path d="M6 40h36" />
      <path d="M9 30v-4a3 3 0 0 1 6 0v4" />
      <path d="M9 30h18v10H9z" />
      <path d="M27 30v-4a3 3 0 0 0-6 0" />
      <path d="M12 40v-3M24 40v-3" />
      <path d="M36 40V21" />
      <path d="M31 21h10l-3.5-8h-3z" />
    </svg>
  );
}

export const serviceIcons: Record<string, (props: IconProps) => React.ReactElement> = {
  development: Development,
  investment: Investment,
  architecture: Architecture,
  management: Management,
  supervision: Supervision,
  interior: Interior,
};
