# Create a set of SVG "bullet cube" icons inspired by the user's green cube + sphere.
# We'll generate scalable 24x24 SVGs with a wireframe cube and a glowing sphere inside.
# Colors use the user's palette plus an emerald "cube-green" for the original look.

from pathlib import Path
import textwrap

outdir = Path("/mnt/data/ibrandbiz_bullets")
outdir.mkdir(parents=True, exist_ok=True)

# Define color variants (name -> hex)
colors = {
    "cube-green": "#16a34a",   # emerald-ish for the original cube vibe
    "teal-1": "#189ab4",       # user palette
    "teal-2": "#75e6da",       # user palette
    "cyan-soft": "#d4f1f4",    # user palette (very light)
    "navy-deep": "#03222e",    # user palette
    "blue-dark": "#05445e",    # user palette
    "teal-bright": "#5cccdc",  # user palette
    "orange": "#f99f1b",       # user palette
}

def make_svg(color_hex: str, on_dark=False):
    # If on_dark, use white strokes and glow; otherwise stroke uses color
    stroke_color = "#FFFFFF" if on_dark else color_hex
    sphere_fill = color_hex
    # Slightly transparent fill, plus a soft glow using filters
    svg = f'''<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
  <defs>
    <filter id="glow" x="-50%" y="-50%" width="200%" height="200%">
      <feGaussianBlur stdDeviation="1.4" result="blur"/>
      <feMerge>
        <feMergeNode in="blur"/>
        <feMergeNode in="SourceGraphic"/>
      </feMerge>
    </filter>
  </defs>
  <!-- Wireframe cube -->
  <g stroke="{stroke_color}" stroke-width="1.3" fill="none" stroke-linecap="round" stroke-linejoin="round">
    <!-- front diamond (square turned 45deg) -->
    <path d="M12 3 L19 8 L12 13 L5 8 Z"/>
    <!-- back/top vertex connections -->
    <path d="M12 13 L12 21"/>
    <path d="M5 8 L5 16 L12 21 L19 16 L19 8"/>
    <!-- inner top edges -->
    <path d="M5 16 L12 11 L19 16"/>
  </g>
  <!-- Inner sphere -->
  <g filter="url(#glow)">
    <circle cx="12" cy="12" r="3.4" fill="{sphere_fill}" fill-opacity="0.95"/>
  </g>
</svg>'''
    return svg

# Write both "regular" (stroke = color) and "on-dark" (stroke = white) variants
paths = []
for name, hexcode in colors.items():
    svg_regular = make_svg(hexcode, on_dark=False)
    svg_dark = make_svg(hexcode, on_dark=True)
    p1 = outdir / f"bullet-cube-{name}.svg"
    p2 = outdir / f"bullet-cube-{name}-on-dark.svg"
    p1.write_text(svg_regular, encoding="utf-8")
    p2.write_text(svg_dark, encoding="utf-8")
    paths += [p1, p2]

# Provide a simple README snippet for usage
readme = textwrap.dedent("""
IBrandBiz Bullet Cube Icons
===========================
This folder contains SVG bullet icons styled as a wireframe cube with a glowing sphere.
- Size: 24x24 (fully scalable)
- Variants: color-stroke (regular) and white-stroke (on-dark)

Recommended usage:
- Inline <img> in HTML or as background-image in CSS.
- For dark hero images/sliders, use the *-on-dark.svg versions.

Example HTML:
  <li><img src="bullet-cube-teal-1-on-dark.svg" width="18" height="18" alt="" style="vertical-align:-2px;margin-right:8px;">with a brand that stands out.</li>

Example CSS (list-style-image):
  .cube-bullets { list-style: none; padding-left: 0; }
  .cube-bullets li {
    background: url('bullet-cube-teal-1-on-dark.svg') no-repeat left 6px/18px 18px;
    padding-left: 28px;
    margin: 8px 0;
  }

Color keys (from your palette):
- teal-1: #189ab4
- teal-2: #75e6da
- cyan-soft: #d4f1f4
- navy-deep: #03222e
- blue-dark: #05445e
- teal-bright: #5cccdc
- orange: #f99f1b
Plus: cube-green (#16a34a) for the original icon vibe.
""")
(outdir / "README.txt").write_text(readme, encoding="utf-8")

paths_str = "\n".join(str(p) for p in paths)
paths_str
