<?php
// Tiny inline SVG icon helper (keeps us from pulling 1000 icon files)
function tabler_icon_svg(string $name): string {
  $common = 'xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"';
  switch ($name) {
    case 'server':
      return "<svg $common><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><rect x=\"3\" y=\"4\" width=\"18\" height=\"8\" rx=\"3\"/><rect x=\"3\" y=\"12\" width=\"18\" height=\"8\" rx=\"3\"/><path d=\"M7 8h.01\"/><path d=\"M7 16h.01\"/></svg>";
    case 'bell':
      return "<svg $common><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M10 5a2 2 0 0 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6\"/><path d=\"M9 17v1a3 3 0 0 0 6 0v-1\"/></svg>";
    case 'mail':
      return "<svg $common><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\"/><path d=\"M3 7l9 6l9 -6\"/></svg>";
    case 'image':
      return "<svg $common><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\"/><circle cx=\"8.5\" cy=\"10.5\" r=\"1.5\"/><path d=\"M21 15l-5 -5l-4 4l-2 -2l-4 4\"/></svg>";
    case 'shield':
      return "<svg $common><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 3l8 4v5c0 5 -3.5 9.5 -8 11c-4.5 -1.5 -8 -6 -8 -11v-5l8 -4\"/><path d=\"M12 11l0 4\"/><path d=\"M12 8h.01\"/></svg>";
    default:
      return "<svg $common><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><circle cx=\"12\" cy=\"12\" r=\"9\"/></svg>";
  }
}
