<?php
/**
 * Heroicons library for Elementor.
 * Heroicons by Tailwind Labs - MIT License
 * https://heroicons.com
 *
 * @package MoxIcon
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class MoxIcon_Heroicons extends MoxIcon_Library_Abstract {

	/**
	 * Icon variant: 'outline' or 'solid'.
	 *
	 * @var string
	 */
	private $variant;

	public function __construct( $variant = 'outline' ) {
		$this->variant = in_array( $variant, array( 'outline', 'solid' ), true ) ? $variant : 'outline';
	}

	public function get_name() {
		return 'moxicon-heroicons-' . $this->variant;
	}

	public function get_label() {
		return 'outline' === $this->variant
			? __( 'Heroicons Outline', 'mox-icons-pack-for-elementor' )
			: __( 'Heroicons Solid', 'mox-icons-pack-for-elementor' );
	}

	public function get_prefix() {
		return 'hi-' . $this->variant . ' hi-' . $this->variant . '-';
	}

	public function get_display_prefix() {
		return 'hi-' . $this->variant;
	}

	public function get_css_url() {
		return MOX_ICON_URL . 'assets/libs/heroicons/heroicons-' . $this->variant . '.css';
	}

	public function get_json_url() {
		return MOX_ICON_URL . 'assets/libs/heroicons/icons-' . $this->variant . '.json';
	}

	public function get_version() {
		return '2.2.0';
	}

	public function get_label_icon() {
		return 'hi-' . $this->variant . ' hi-' . $this->variant . '-home';
	}
}
