'', 'bug' => 'M9 4.4 7.6 3l1.4-1.4 1.6 1.6a5 5 0 0 1 2.8 0L15 1.6 16.4 3 15 4.4A5 5 0 0 1 17 8H7a5 5 0 0 1 2-3.6ZM5 10h14v3a7 7 0 0 1-14 0v-3Zm-3 1h2.5v2H2v-2Zm17.5 0H22v2h-2.5v-2ZM2 16.5h3.2v2H2v-2Zm16.8 0H22v2h-3.2v-2Z', 'chat' => 'M4 3h16a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2h-9l-5 4v-4H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z', 'flag' => 'M5 2h2v20H5V2Zm3 1h11l-2.5 4.5L19 12H8V3Z', 'lightbulb' => 'M12 2a7 7 0 0 0-4 12.7V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.3A7 7 0 0 0 12 2ZM9 19.5h6V20a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-.5Z', 'wrench' => 'M21.6 6.4A5.6 5.6 0 0 1 14 11.6L6.1 19.5a2.4 2.4 0 0 1-3.4-3.4L10.6 8A5.6 5.6 0 0 1 17.8.6l-3.4 3.4.7 2.7 2.7.7 3.4-3.4c.3.8.4 1.6.4 2.4Z', ]; public const ICON_LABELS = [ 'bubble' => 'Report bubble', 'bug' => 'Bug', 'chat' => 'Chat', 'flag' => 'Flag', 'lightbulb' => 'Lightbulb', 'wrench' => 'Wrench', ]; /** @return array */ public static function attributes(): array { $attributes = []; $color = (string) sanitize_hex_color((string) Options::get('launcher_color')); if ($color === '' && Brand::custom()) { $color = Brand::color(); } if ($color !== '') { $attributes['data-sarcio-accent'] = $color; } $path = self::ICONS[(string) Options::get('launcher_icon')] ?? ''; if ($path !== '') { $attributes['data-sarcio-icon-path'] = $path; } if (Options::get('launcher_style') === 'label') { $attributes['data-sarcio-launcher'] = 'label'; $attributes['data-sarcio-label'] = (string) Options::get('launcher_label'); } if (Options::get('launcher_position') === 'left') { $attributes['data-sarcio-position'] = 'left'; } if (Options::get('widget_mode') === 'dark') { $attributes['data-sarcio-mode'] = 'dark'; } return $attributes; } }