// admin-icons.jsx — extra icons just for the back-office views.
// Re-uses the line style from the field tablet's icons.jsx.

const sw = 1.75;
const baseProps = (size = 20) => ({
  width: size, height: size, viewBox: '0 0 24 24',
  fill: 'none', stroke: 'currentColor',
  strokeWidth: sw, strokeLinecap: 'round', strokeLinejoin: 'round',
  style: { display: 'inline-block', flexShrink: 0 },
});

const IconBuilding = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <path d="M4 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18M4 22h12M20 22V12M16 22h6M9 6h2M9 10h2M9 14h2M9 18h2" />
  </svg>
);
const IconDollar = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <path d="M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" />
  </svg>
);
const IconTax = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <path d="M9 14l6-6M9 9h.01M15 15h.01M3 7l9-5 9 5v10l-9 5-9-5V7z" />
  </svg>
);
const IconRRB = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <rect x="3" y="6" width="18" height="12" rx="2" />
    <path d="M3 12h18M7 18v3M17 18v3M9 9h6" />
  </svg>
);
const IconPlug = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <path d="M9 2v6M15 2v6M7 8h10v4a5 5 0 0 1-5 5 5 5 0 0 1-5-5V8zM12 17v5" />
  </svg>
);
const IconGavel = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <path d="M14 4l6 6M9 9l6 6M5 14l5 5M3 22h12M11 6l4-4 7 7-4 4z" />
  </svg>
);
const IconUsersBig = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M22 21v-2a4 4 0 0 0-3-3.87M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM16 3.13a4 4 0 0 1 0 7.75" />
  </svg>
);
const IconMap = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <path d="M9 4L3 6v14l6-2 6 2 6-2V4l-6 2-6-2zM9 4v14M15 6v14" />
  </svg>
);
const IconBell = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9M10 21a2 2 0 0 0 4 0" />
  </svg>
);
const IconDownload = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3" />
  </svg>
);
const IconUpload = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12" />
  </svg>
);
const IconFilter = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <path d="M22 3H2l8 9.46V19l4 2v-8.54L22 3z" />
  </svg>
);
const IconKanban = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <rect x="3" y="3" width="6" height="14" rx="1" />
    <rect x="11" y="3" width="6" height="10" rx="1" />
    <rect x="19" y="3" width="2" height="6" rx="1" />
  </svg>
);
const IconSettings = ({ size = 20, style }) => (
  <svg {...baseProps(size)} style={{ ...baseProps(size).style, ...style }}>
    <circle cx="12" cy="12" r="3" />
    <path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" />
  </svg>
);

Object.assign(window, {
  IconBuilding, IconDollar, IconTax, IconRRB, IconPlug, IconGavel,
  IconUsersBig, IconMap, IconBell, IconDownload, IconUpload, IconFilter,
  IconKanban, IconSettings,
});
