';
}
/**
* Renders the spinner component container.
* This method outputs the HTML structure for the spinner overlay.
*
* @param string $type The spinner type (blocks, wifi, pulse, random)
* @return void
*/
public function render($type = self::TYPE_RANDOM) {
$spinner_type = $type;
if ($spinner_type === self::TYPE_RANDOM) {
$spinner_types = array(self::TYPE_BLOCKS, self::TYPE_WIFI, self::TYPE_PULSE);
$spinner_type = $spinner_types[array_rand($spinner_types)];
}
$blocks_svg_path = str_replace(AFFILILABS_PLUGIN_URL, AFFILILABS_PLUGIN_PATH, AFFILILABS_ASSETS_SPINNER_BLOCKS_SVG);
$wifi_svg_path = str_replace(AFFILILABS_PLUGIN_URL, AFFILILABS_PLUGIN_PATH, AFFILILABS_ASSETS_SPINNER_WIFI_SVG);
$pulse_svg_path = str_replace(AFFILILABS_PLUGIN_URL, AFFILILABS_PLUGIN_PATH, AFFILILABS_ASSETS_SPINNER_PULSE_SVG);
$blocks_svg = $this->get_svg_content($blocks_svg_path);
$wifi_svg = $this->get_svg_content($wifi_svg_path);
$pulse_svg = $this->get_svg_content($pulse_svg_path);
$current_svg = $blocks_svg;
if ($spinner_type === self::TYPE_WIFI) {
$current_svg = $wifi_svg;
} elseif ($spinner_type === self::TYPE_PULSE) {
$current_svg = $pulse_svg;
}
?>