<?php
/**
 * Curated inline SVG icons for the HP Pricing Table.
 *
 * Lucide-style outlined icons (24×24, 1.5px stroke, currentColor).
 * Self-contained so the block has no external icon dependencies.
 */

if (!function_exists('hp_pricing_icon_options')) {
	function hp_pricing_icon_options() {
		return [
			'mail'            => 'Mail / envelope',
			'refresh'         => 'Refresh / repeat',
			'users'           => 'Users',
			'award'           => 'Award / ribbon',
			'sparkles'        => 'Sparkles',
			'bell'            => 'Bell',
			'store'           => 'Store',
			'share'           => 'Share / network',
			'star'            => 'Star',
			'phone'           => 'Phone',
			'headset'         => 'Headset (support)',
			'check'           => 'Check',
			'infinity'        => 'Infinity',
			'layout-grid'     => 'Dashboard grid',
			'mail-check'      => 'Mail with check',
			'clipboard-check' => 'Clipboard check',
			'map-pin'         => 'Map pin',
			'home'            => 'Home / house (listing)',
			'calendar-range'  => 'Calendar (date range)',
			'upload'          => 'Upload (arrow + tray)',
			'upload-cloud'    => 'Upload (cloud)',
			'handshake'       => 'Handshake (partnership)',
			'puzzle'          => 'Puzzle piece (integration)',
			'rss'             => 'RSS / data feed',
			'git-branch'      => 'Branch / multi-branch',
			'palette'         => 'Palette (branding)',
			'shield-check'    => 'Shield with check (compliance)',
			'database'        => 'Database / data cleanup',
			'shopping-cart'   => 'Shopping cart (store)',
			'plug'            => 'Plug (plugin / integration)',
		];
	}
}

if (!function_exists('hp_pricing_icon')) {
	function hp_pricing_icon($name) {
		$paths = [
			'mail' =>
				'<rect x="3" y="5" width="18" height="14" rx="2"/>'
				. '<path d="m3 7 9 6 9-6"/>',
			'refresh' =>
				'<path d="M21 12a9 9 0 0 1-15.36 6.36L3 16"/>'
				. '<path d="M3 12a9 9 0 0 1 15.36-6.36L21 8"/>'
				. '<path d="M21 3v5h-5"/>'
				. '<path d="M3 21v-5h5"/>',
			'users' =>
				'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/>'
				. '<circle cx="9" cy="7" r="4"/>'
				. '<path d="M22 21v-2a4 4 0 0 0-3-3.87"/>'
				. '<path d="M16 3.13a4 4 0 0 1 0 7.75"/>',
			'award' =>
				'<circle cx="12" cy="9" r="6"/>'
				. '<path d="m8.5 13.5-1.5 7L12 18l5 2.5-1.5-7"/>',
			'sparkles' =>
				'<path d="M12 3v3M12 18v3M3 12h3M18 12h3"/>'
				. '<path d="m5.6 5.6 2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1"/>'
				. '<circle cx="12" cy="12" r="2.5"/>',
			'bell' =>
				'<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/>'
				. '<path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/>',
			'store' =>
				'<path d="M3 9h18l-1-5H4Z"/>'
				. '<path d="M5 9v11h14V9"/>'
				. '<path d="M9 20v-6h6v6"/>',
			'share' =>
				'<circle cx="18" cy="5" r="3"/>'
				. '<circle cx="6" cy="12" r="3"/>'
				. '<circle cx="18" cy="19" r="3"/>'
				. '<path d="m8.6 13.5 6.8 4M15.4 6.5l-6.8 4"/>',
			'star' =>
				'<path d="m12 3 2.7 5.5 6.1.9-4.4 4.3 1 6L12 16.9 6.6 19.7l1-6L3.2 9.4l6.1-.9Z"/>',
			'phone' =>
				'<path d="M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6 19.8 19.8 0 0 1-3.1-8.7A2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.3 1.8.6 2.7a2 2 0 0 1-.5 2.1L8 9.7a16 16 0 0 0 6 6l1.2-1.2a2 2 0 0 1 2.1-.5c.9.3 1.8.5 2.7.6a2 2 0 0 1 1.7 2Z"/>',
			'headset' =>
				'<path d="M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H4a1 1 0 0 1-1-1v-6Z"/>'
				. '<path d="M21 14h-3a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h2a1 1 0 0 0 1-1v-6Z"/>'
				. '<path d="M3 14a9 9 0 0 1 18 0"/>',
			'check' =>
				'<path d="m4.5 12.5 5 5L20 7"/>',
			'infinity' =>
				'<path d="M6 12c0-2.2 1.8-4 4-4 1.6 0 2.8.9 4 2.4S16.4 16 18 16c2.2 0 4-1.8 4-4s-1.8-4-4-4c-1.6 0-2.8.9-4 2.4S7.6 16 6 16c-2.2 0-4-1.8-4-4s1.8-4 4-4Z"/>',
			'layout-grid' =>
				'<rect x="3" y="3" width="7" height="7" rx="1"/>'
				. '<rect x="14" y="3" width="7" height="7" rx="1"/>'
				. '<rect x="3" y="14" width="7" height="7" rx="1"/>'
				. '<rect x="14" y="14" width="7" height="7" rx="1"/>',
			'mail-check' =>
				'<path d="M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h9"/>'
				. '<path d="m2 7 10 6 10-6"/>'
				. '<path d="m16 19 2 2 4-4"/>',
			'clipboard-check' =>
				'<rect x="8" y="3" width="8" height="4" rx="1"/>'
				. '<path d="M16 5h2a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2"/>'
				. '<path d="m9 14 2 2 4-4"/>',
			'map-pin' =>
				'<path d="M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 0 1 16 0Z"/>'
				. '<circle cx="12" cy="10" r="3"/>',
			'home' =>
				'<path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z"/>'
				. '<path d="M9 22V12h6v10"/>',
			'calendar-range' =>
				'<rect x="3" y="4" width="18" height="18" rx="2"/>'
				. '<path d="M16 2v4M8 2v4M3 10h18"/>'
				. '<path d="M7 14h2M15 14h2"/>'
				. '<path d="M7 18h4M15 18h2"/>',
			'upload' =>
				'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>'
				. '<path d="m17 8-5-5-5 5"/>'
				. '<path d="M12 3v12"/>',
			'upload-cloud' =>
				'<path d="M4 14.9A7 7 0 1 1 15.7 8h1.8a4.5 4.5 0 0 1 2.5 8.2"/>'
				. '<path d="M12 12v9"/>'
				. '<path d="m16 16-4-4-4 4"/>',
			'handshake' =>
				'<path d="m11 17 2 2a1 1 0 1 0 3-3"/>'
				. '<path d="m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4"/>'
				. '<path d="m21 3 1 11h-2"/>'
				. '<path d="M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3"/>'
				. '<path d="M3 4h8"/>',
			'puzzle' =>
				'<path d="M15.4 4.4a1 1 0 0 0 1.68-.47 2.5 2.5 0 1 1 3.01 3.01 1 1 0 0 0-.47 1.68l1.68 1.68a2.41 2.41 0 0 1 0 3.42l-1.68 1.68a1 1 0 0 1-1.68-.47 2.5 2.5 0 1 0-3.01 3.01 1 1 0 0 1 .47 1.68l-1.68 1.68a2.41 2.41 0 0 1-3.42 0L8.6 19.6a1 1 0 0 0-1.68.47 2.5 2.5 0 1 1-3.01-3.01 1 1 0 0 0 .47-1.68L2.7 13.7a2.41 2.41 0 0 1 0-3.42l1.68-1.68a1 1 0 0 1 1.68.47 2.5 2.5 0 1 0 3.01-3.01 1 1 0 0 1-.47-1.68l1.68-1.68a2.41 2.41 0 0 1 3.42 0Z"/>',
			'rss' =>
				'<path d="M4 11a9 9 0 0 1 9 9"/>'
				. '<path d="M4 4a16 16 0 0 1 16 16"/>'
				. '<circle cx="5" cy="19" r="1"/>',
			'git-branch' =>
				'<line x1="6" x2="6" y1="3" y2="15"/>'
				. '<circle cx="18" cy="6" r="3"/>'
				. '<circle cx="6" cy="18" r="3"/>'
				. '<path d="M18 9a9 9 0 0 1-9 9"/>',
			'palette' =>
				'<path d="M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8Z"/>'
				. '<circle cx="13.5" cy="6.5" r=".75" fill="currentColor" stroke="none"/>'
				. '<circle cx="17.5" cy="10.5" r=".75" fill="currentColor" stroke="none"/>'
				. '<circle cx="6.5" cy="12.5" r=".75" fill="currentColor" stroke="none"/>'
				. '<circle cx="8.5" cy="7.5" r=".75" fill="currentColor" stroke="none"/>',
			'shield-check' =>
				'<path d="M20 13c0 5-3.5 7.5-7.7 9a1 1 0 0 1-.7 0C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.5 3.8 17 5 19 5a1 1 0 0 1 1 1Z"/>'
				. '<path d="m9 12 2 2 4-4"/>',
			'database' =>
				'<ellipse cx="12" cy="5" rx="9" ry="3"/>'
				. '<path d="M3 5v6c0 1.66 4 3 9 3s9-1.34 9-3V5"/>'
				. '<path d="M3 11v8c0 1.66 4 3 9 3s9-1.34 9-3v-8"/>',
			'shopping-cart' =>
				'<circle cx="9" cy="21" r="1"/>'
				. '<circle cx="20" cy="21" r="1"/>'
				. '<path d="M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6"/>',
			'plug' =>
				'<path d="M12 22v-5"/>'
				. '<path d="M9 8V2"/>'
				. '<path d="M15 8V2"/>'
				. '<path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z"/>',
		];

		if (!isset($paths[$name])) {
			$name = 'check';
		}

		return '<svg class="hp-feature__svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" '
			. 'stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">'
			. $paths[$name]
			. '</svg>';
	}
}
