<?php
/**
 * @package    HaruTheme/Haru TeeSpace
 * @version    1.0.0
 * @author     Administrator <admin@harutheme.com>
 * @copyright  Copyright 2022, HaruTheme
 * @license    http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
 * @link       http://harutheme.com
*/

/**
 * Adding custom icon to icon control in Elementor
 */
// https://themify.me/themify-icons
// https://crocoblock.com/blog/how-to-add-custom-icons-to-elementor-and-jet-plugins/

if ( ! function_exists( 'haru_add_hicon_icons_tab' ) ) {
	function haru_add_hicon_icons_tab( $tabs = array() ) {

		// Append new icons
		$hicon_icons = array(
			'volume-up',
			'volume-off',
			'volume-medium',
			'volume-low',
			'volume-high',
			'star',
			'star-outline',
			'search',
			'remove',
			'remove-circle',
			'remove-circle-outline',
			'random',
			'play',
			'play-radius',
			'play-outline',
			'play-circle',
			'play-circle-filled',
			'ios-volume-low',
			'ios-volume-high',
			'ios-arrow-forward',
			'ios-arrow-back',
			'heart',
			'heart-outline',
			'comments',
			'close',
			'close-outline',
			'chevron-up',
			'chevron-right',
			'chevron-left',
			'chevron-down',
			'cart',
			'cart-plus',
			'cart-limit',
			'calendar',
			'bag',
			'arrow-up',
			'arrow-up-b',
			'arrow-thin-up',
			'arrow-thin-right',
			'arrow-thin-left',
			'arrow-thin-down',
			'arrow-right',
			'arrow-right-b',
			'arrow-left',
			'arrow-left-b',
			'arrow-down',
			'arrow-down-b',
			'add',
			'add-circle',
			'add-circle-outline',
			'sync-alt',
			'list-view',
			'grid-view',
			'description',
			'article',
			'autorenew',
			'credit-card',
			'check',
			'check-circle-outline',
			'check-box',
			'highlight-off',
			'cancel',
			'error',
			'error-outline',
			'menu',
			'funnel',
			'shop-bag',
			'magnify',
			'arrow-right-l',
			'arrow-left-l',
		);
		
		$tabs['hicon-icons'] = array(
			'name'          => 'hicon-icons',
			'label'         => esc_html__( 'Haru Icons', 'text-domain' ),
			'labelIcon'     => 'fas fa-font',
			'prefix'        => 'hicon-',
			'displayPrefix' => '',
			'url'           => get_template_directory_uri() . '/assets/libraries/haruicons/haruicons.css',
			'icons'         => $hicon_icons,
			'ver'           => '1.0.0',
		);

		return $tabs;
	}

	add_filter( 'elementor/icons_manager/additional_tabs', 'haru_add_hicon_icons_tab' );
}

if ( ! function_exists( 'haru_add_pricon_icons_tab' ) ) {
	function haru_add_pricon_icons_tab( $tabs = array() ) {

		// Append new icons
		$pricon_icons = array(
			'printer',
			'cube',
			'tree',
			'design',
			'printing',
			'universe',
			'global',
			'return',
			'phone',
			'payment',
			'database',
			'globe-address',
			'package',
			'box-order',
			'ecology',
			'mix-circle',
			'supplies',
			'equalizer',
			'delivery',
			'credit-card',
			'no-dollar',
			'bounding-box',
			'text-t',
			'shape',
			'image',
			'award',
			'box',
			'color',
			'delivery-2',
			'worldwide',
			'tshirt-1',
			'tshirt-2',
			'star',
			'photo-filter',
			'package-2',
			'laptop',
			'tablet',
			'smartphone',
			'laptop-2',
			'tshirt-3',
			'checked',
			'speedometer',
			'gallery',
			'secure-payment',
			'telephone',
			'return-2',
			'tshirt-4',
			'suitcase',
			'printer-2',
			'design-2',
			'd-printing',
			'web-browser',
			'web-browser-2',
			'web-browser-3',
			'support',
			'mobile',
			'file',
			'css3',
			// 'woo',
			'right-arrow',
			'elementor',
			'click',
		);
		
		$tabs['pricon-icons'] = array(
			'name'          => 'pricon-icons',
			'label'         => esc_html__( 'Pri Icons', 'text-domain' ),
			'labelIcon'     => 'fas fa-font',
			'prefix'        => 'pricon-',
			'displayPrefix' => '',
			'url'           => get_template_directory_uri() . '/assets/libraries/pricons/pricons.css',
			'icons'         => $pricon_icons,
			'ver'           => '1.0.0',
		);

		return $tabs;
	}

	add_filter( 'elementor/icons_manager/additional_tabs', 'haru_add_pricon_icons_tab' );
}

if ( ! function_exists( 'haru_add_phosphor_icons_tab' ) ) {
	function haru_add_phosphor_icons_tab( $tabs = array() ) {

		// Append new icons
		$phosphor_icons = array(
			'arrow-clockwise',
			'arrow-counter-clockwise',
			'arrow-down-left',
			'arrow-down-right',
			'arrow-down',
			'arrow-left',
			'arrow-right',
			'arrow-up-left',
			'arrow-up-right',
			'arrow-up',
			'arrows-clockwise',
			'arrows-counter-clockwise',
			'arrows-down-up',
			'arrows-left-right',
			'bag-simple',
			'bag',
			'caret-double-down',
			'caret-double-left',
			'caret-double-right',
			'caret-double-up',
			'caret-down',
			'caret-left',
			'caret-right',
			'caret-up',
			'check',
			'eye-slash',
			'eye',
			'handbag-simple',
			'handbag',
			'list',
			'magnifying-glass-minus',
			'magnifying-glass-plus',
			'magnifying-glass',
			'minus-circle',
			'minus',
			'pencil-simple',
			'pencil',
			'plus-circle',
			'plus',
			'shopping-bag-open',
			'shopping-bag',
			'shopping-cart-simple',
			'shopping-cart',
			'squares-four',
			'star',
			'user-minus',
			'user-plus',
			'user',
			'chat-circle-text',
			'chat-circle',
			'chats-circle',
			'clock',
			'play',
			'phone',
			'phone-call',
			'play-circle',
			'chat-circle-dots',
			'chat',
			'chats',
			'chat-dots',
			'chat-text',
			'paint-bucket',
			'paint-brush',
			'paint-roller',
			'paint-brush-household',
			'paint-brush-broad',
			'package',
			'paperclip',
			'paperclip-horizontal',
			'calendar-blank',
			'camera',
			'printer',
			'heart-break',
			'heart',
			'map-pin',
			'airplane-tilt',
			'paper-plane-tilt',
			'paper-plane-right',
			'truck',
			'trash-simple',
			'trash',
			'close',
			'close-circle',
			'close-square',
			'folder-simple',
			'folder',
			'file',
			'upload',
			'file-text',
			'upload-simple',
			'spinner',
			'spinner-gap',
			'envelope-simple-open',
			'envelope-simple',
			'envelope-open',
			'envelope',
			'lightning-fill',
			'globe-hemisphere-west-fill',
			'flag-fill',
			'drop-half-fill',
			'chat-centered-text-fill',
			'planet-fill',
			'users-fill',
			'question-fill',
			'star-fill',
		);
		
		$tabs['phosphor-icons'] = array(
			'name'          => 'phosphor-icons',
			'label'         => esc_html__( 'Phospho Icons', 'text-domain' ),
			'labelIcon'     => 'fas fa-font',
			'prefix'        => 'phosphor-',
			'displayPrefix' => '',
			'url'           => get_template_directory_uri() . '/assets/libraries/phosphor/phosphor.css',
			'icons'         => $phosphor_icons,
			'ver'           => '1.0.0',
		);

		return $tabs;
	}

	add_filter( 'elementor/icons_manager/additional_tabs', 'haru_add_phosphor_icons_tab' );
}
