<?php

defined('ABSPATH') || exit;

use Elementor\Core\Common\Modules\Ajax\Module as Ajax;

class kavehelementorlibrary {

	public function __construct() {
		add_action('elementor/editor/before_enqueue_scripts', [ $this, 'enqueue_editor_scripts' ]);
		add_action('rest_api_init', [ $this, 'register_rest_api' ]);
		add_action('wp_print_footer_scripts', [ $this, 'render_popup_html' ], 20);
		add_action('elementor/ajax/register_actions', [ $this, 'register_ajax_actions' ]);
	}

	public function enqueue_editor_scripts() {
		if ( \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
			wp_enqueue_script(
			'kaveh-elementor-library-script',
			KAVEH_TEMPLATE_URI . '/assets/js/elementor-custom-button.js',
			[ 'jquery', 'elementor-editor', 'wp-api' ],
			'1.0.0',
			true
		);
		
		// Localize script with REST API URL for better compatibility
		wp_localize_script('kaveh-elementor-library-script', 'kavehLibrarySettings', [
			'apiUrl' => rest_url('kaveh-library/templates'),
			'nonce' => wp_create_nonce('wp_rest')
		]);
		}
	}

	public function register_rest_api() {
		register_rest_route('kaveh-library', '/templates', [
			'methods' => 'GET',
			'callback' => [ $this, 'get_template_data' ],
			'permission_callback' => '__return_true',
		]);
	}

    public function get_template_data() {
        return [
            'layouts' => $this->get_layouts(),
            'taxonomies' => [
                'layout_tabs' => [
                    'pages' => ['slug' => 'pages', 'title' => esc_html__('Demos', 'kavehTheme')],
                    'header' => ['slug' => 'header', 'title' => esc_html__('header', 'kavehTheme')],
                    'footer' => ['slug' => 'footer', 'title' => esc_html__('footer', 'kavehTheme')],
                ],
                'layout_categories' => $this->get_categories(),
            ],
        ];
    }
    
    private function get_categories() {
        return [
            'pages' => [
                'title' => esc_html__('Pages', 'kavehTheme'),
                'icon' => 'eicon-document-file',
            ],
            'homepage' => [
                'title' => esc_html__('Homepage', 'kavehTheme'),
                'icon' => 'eicon-home-heart',
            ],
            'ecommerce' => [
                'title' => esc_html__('E-commerce', 'kavehTheme'),
                'icon' => 'eicon-cart',
            ],
            'shop' => [
                'title' => esc_html__('Shop', 'kavehTheme'),
                'icon' => 'eicon-products',
            ],
            'product' => [
                'title' => esc_html__('Product', 'kavehTheme'),
                'icon' => 'eicon-product-info',
            ],
            'about' => [
                'title' => esc_html__('About', 'kavehTheme'),
                'icon' => 'eicon-info-circle',
            ],
            'contact' => [
                'title' => esc_html__('Contact', 'kavehTheme'),
                'icon' => 'eicon-mail',
            ],
            'blog' => [
                'title' => esc_html__('Blog', 'kavehTheme'),
                'icon' => 'eicon-post-list',
            ],
            'blocks' => [
                'title' => esc_html__('Blocks', 'kavehTheme'),
                'icon' => 'eicon-library-open',
            ],
            'header' => [
                'title' => esc_html__('Header', 'kavehTheme'),
                'icon' => 'eicon-header',
            ],
            'footer' => [
                'title' => esc_html__('Footer', 'kavehTheme'),
                'icon' => 'eicon-footer',
            ],
            'hero' => [
                'title' => esc_html__('Hero Section', 'kavehTheme'),
                'icon' => 'eicon-banner',
            ],
            'features' => [
                'title' => esc_html__('Features', 'kavehTheme'),
                'icon' => 'eicon-featured-image',
            ],
            'testimonials' => [
                'title' => esc_html__('Testimonials', 'kavehTheme'),
                'icon' => 'eicon-testimonial',
            ],
            'cta' => [
                'title' => esc_html__('Call to Action', 'kavehTheme'),
                'icon' => 'eicon-call-to-action',
            ],
            'team' => [
                'title' => esc_html__('Team', 'kavehTheme'),
                'icon' => 'eicon-person',
            ],
            'pricing' => [
                'title' => esc_html__('Pricing', 'kavehTheme'),
                'icon' => 'eicon-price-table',
            ],
        ];
    }
    
    private function get_layouts() {
        return [
            // 🏠 Homepage Layouts
            'homepage_digital' => [
                'ID' => 'homepage_digital',
                'title' => esc_html__('Digital Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-011.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-011.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/1',
                'json_url' => get_template_directory_uri() . '/assets/layouts/1/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_digital',
            ],
            'homepage_furniture' => [
                'ID' => 'homepage_furniture',
                'title' => esc_html__('Furniture Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-211.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-211.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/2/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/2/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_furniture',
            ],
            'homepage_accessories' => [
                'ID' => 'homepage_accessories',
                'title' => esc_html__('Accessories Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-14.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-14.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/3',
                'json_url' => get_template_directory_uri() . '/assets/layouts/3/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_accessories',
            ],
            'homepage_fashion' => [
                'ID' => 'homepage_fashion',
                'title' => esc_html__('Fashion Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-01.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-01.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/4',
                'json_url' => get_template_directory_uri() . '/assets/layouts/4/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_fashion',
            ],
            'homepage_petshop' => [
                'ID' => 'homepage_petshop',
                'title' => esc_html__('Pet Shop Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-04.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-04.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/5',
                'json_url' => get_template_directory_uri() . '/assets/layouts/5/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_petshop',
            ],
            'homepage_sports' => [
                'ID' => 'homepage_sports',
                'title' => esc_html__('Sports Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-12.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-12.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/6',
                'json_url' => get_template_directory_uri() . '/assets/layouts/6/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_sports',
            ],
            'homepage_supplements' => [
                'ID' => 'homepage_supplements',
                'title' => esc_html__('Sports Supplements Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-08.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-08.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/7',
                'json_url' => get_template_directory_uri() . '/assets/layouts/7/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_supplements',
            ],
            'homepage_outdoor' => [
                'ID' => 'homepage_outdoor',
                'title' => esc_html__('Outdoor Equipment Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-081.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-081.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/8',
                'json_url' => get_template_directory_uri() . '/assets/layouts/8/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_outdoor',
            ],
            'homepage_gaming' => [
                'ID' => 'homepage_gaming',
                'title' => esc_html__('Gaming Console Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-11.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-11.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/9',
                'json_url' => get_template_directory_uri() . '/assets/layouts/9/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_gaming',
            ],
            'homepage_tools' => [
                'ID' => 'homepage_tools',
                'title' => esc_html__('Tools Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-111.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-111.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/11',
                'json_url' => get_template_directory_uri() . '/assets/layouts/11/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_tools',
            ],
            'homepage_home_appliances' => [
                'ID' => 'homepage_home_appliances',
                'title' => esc_html__('Home Appliances Store', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-121.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-121.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/12',
                'json_url' => get_template_directory_uri() . '/assets/layouts/12/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_home_appliances',
            ],
            'homepage_gaming2' => [
                'ID' => 'homepage_gaming2',
                'title' => esc_html__('gaming2 Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-07.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-07.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/13',
                'json_url' => get_template_directory_uri() . '/assets/layouts/13/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_gaming2',
            ],
            'homepage_perfume' => [
                'ID' => 'homepage_perfume',
                'title' => esc_html__('Perfume Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-06.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-06.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/14',
                'json_url' => get_template_directory_uri() . '/assets/layouts/14/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_perfume',
            ],
            'homepage_handicrafts' => [
                'ID' => 'homepage_handicrafts',
                'title' => esc_html__('Handicrafts Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-05.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-05.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/15',
                'json_url' => get_template_directory_uri() . '/assets/layouts/15/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_handicrafts',
            ],
            'homepage_supermarket' => [
                'ID' => 'homepage_supermarket',
                'title' => esc_html__('Supermarket Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-03.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo-03.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/16',
                'json_url' => get_template_directory_uri() . '/assets/layouts/16/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_supermarket',
            ],
            'homepage_digital_2' => [
                'ID' => 'homepage_digital_2',
                'title' => esc_html__('Digital 2 Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo17.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo17.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/17/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/17/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_digital_2',
            ],
            'homepage_books' => [
                'ID' => 'homepage_books',
                'title' => esc_html__('Book Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo18.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo18.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/18/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/18/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_books',
            ],
            'homepage_laptop' => [
                'ID' => 'homepage_laptop',
                'title' => esc_html__('Laptop Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo19.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo19.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/19/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/19/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_laptop',
            ],
            'homepage_toys' => [
                'ID' => 'homepage_toys',
                'title' => esc_html__('Toy Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo20.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo20.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/20/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/20/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_toys',
            ],
            'homepage_carpet' => [
                'ID' => 'homepage_carpet',
                'title' => esc_html__('Carpet Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo21.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo21.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/21/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/21/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_carpet',
            ],
            'homepage_leather' => [
                'ID' => 'homepage_leather',
                'title' => esc_html__('Leather Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo22.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo22.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/22',
                'json_url' => get_template_directory_uri() . '/assets/layouts/22/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_leather',
            ],
            'homepage_medical' => [
                'ID' => 'homepage_medical',
                'title' => esc_html__('Medical Store Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo23.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo23.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/23/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/24/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_medical',
            ],
            'homepage_Baby-item' => [
                'ID' => 'homepage_Baby-item',
                'title' => esc_html__('Baby Items Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo24.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo24.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/24/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/23/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_Baby-item',
            ],
            'homepage_Cosmetics' => [
                'ID' => 'homepage_Cosmetics',
                'title' => esc_html__('Cosmetics Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo26.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo26.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/25/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/25/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_Cosmetics',
            ],
            'homepage_Camera' => [
                'ID' => 'homepage_Camera',
                'title' => esc_html__('Camera Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo25.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo25.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/26/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/26/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_Camera',
            ],
            'homepage_Digikala' => [
                'ID' => 'homepage_Digikala',
                'title' => esc_html__('Digikala Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo25(3).png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo25(3).png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/27/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/27/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_Digikala',
            ],
            'homepage_Plumbing_Fixtures' => [
                'ID' => 'homepage_Plumbing_Fixtures',
                'title' => esc_html__('Plumbing Fixtures Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo28.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo28.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/28/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/28/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_Plumbing_Fixtures',
            ],
            'homepage_Beauty' => [
                'ID' => 'homepage_Beauty',
                'title' => esc_html__('Beauty Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo29.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo29.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/29/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/29/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_Beauty',
            ],
            'homepage_Gift_Shop' => [
                'ID' => 'homepage_Gift_Shop',
                'title' => esc_html__('Gift Shop Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo30.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo30.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/30/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/30/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_Gift_Shop',
            ],
            'homepage_Clothing_And_Fashion' => [
                'ID' => 'homepage_Clothing_And_Fashion',
                'title' => esc_html__('Clothing & Fashion Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo31.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo31.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/31/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/31/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_Clothing_And_Fashion',
            ],
            'homepage_Flowers' => [
                'ID' => 'homepage_Flowers',
                'title' => esc_html__('Flowers & Plants Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo32.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo32.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/32/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/32/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_Flowers',
            ],
            'homepage_Apple_NIC' => [
                'ID' => 'homepage_Apple_NIC',
                'title' => esc_html__('Apple NIC Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo33.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo33.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/33/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/33/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_Apple_NIC',
            ],
            'homepage_Digi_Style' => [
                'ID' => 'homepage_Digi_Style',
                'title' => esc_html__('Digi Style Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo34.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo34.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/34/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/34/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_Digi_Style',
            ],
            'homepage_Bani_Mode' => [
                'ID' => 'homepage_Bani_Mode',
                'title' => esc_html__('Bani Mode Home', 'kavehTheme'),
                'thumbnail' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo35.png',
                'preview' => ['url' => 'https://s5.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/demo35.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/35/',
                'json_url' => get_template_directory_uri() . '/assets/layouts/35/main.json',
                'package' => 'free',
                'category' => ['pages', 'homepage', 'ecommerce'],
                'get_searchable_unique_name' => 'homepage_Bani_Mode',
            ],


            //////////////////////////////////// Header ////////////////////////////////////


            'header_digital' => [
                'ID' => 'header_digital',
                'title' => esc_html__('Digital Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header1.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header1.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/1',
                'json_url' => get_template_directory_uri() . '/assets/layouts/1/header-1.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_digital',
            ],

            'header_furniture' => [
                'ID' => 'header_furniture',
                'title' => esc_html__('Furniture Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header2.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header2.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/2',
                'json_url' => get_template_directory_uri() . '/assets/layouts/2/header-2.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_furniture',
            ],

            'header_accessories' => [
                'ID' => 'header_accessories',
                'title' => esc_html__('Accessories Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header3.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header3.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/3',
                'json_url' => get_template_directory_uri() . '/assets/layouts/3/header-3.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_accessories',
            ],

            'header_fashion' => [
                'ID' => 'header_fashion',
                'title' => esc_html__('Fashion Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header4.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header4.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/4',
                'json_url' => get_template_directory_uri() . '/assets/layouts/4/header-4.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_fashion',
            ],

            'header_petshop' => [
                'ID' => 'header_petshop',
                'title' => esc_html__('Pet Shop Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header5.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header5.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/5',
                'json_url' => get_template_directory_uri() . '/assets/layouts/5/header-5.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_petshop',
            ],

            'header_sports' => [
                'ID' => 'header_sports',
                'title' => esc_html__('Sports Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header6.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header6.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/6',
                'json_url' => get_template_directory_uri() . '/assets/layouts/6/header-6.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_sports',
            ],

            'header_supplements' => [
                'ID' => 'header_supplements',
                'title' => esc_html__('Sports Supplements Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header7.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header7.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/7',
                'json_url' => get_template_directory_uri() . '/assets/layouts/7/header-7.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_supplements',
            ],

            'header_outdoor' => [
                'ID' => 'header_outdoor',
                'title' => esc_html__('Outdoor Equipment Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header8.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header8.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/8',
                'json_url' => get_template_directory_uri() . '/assets/layouts/8/header-8.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_outdoor',
            ],

            'header_gaming_console' => [
                'ID' => 'header_gaming_console',
                'title' => esc_html__('Gaming Console Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header9.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header9.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/9',
                'json_url' => get_template_directory_uri() . '/assets/layouts/9/header-9.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_gaming_console',
            ],

            'header_tools' => [
                'ID' => 'header_tools',
                'title' => esc_html__('Tools Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header11.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header11.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/11',
                'json_url' => get_template_directory_uri() . '/assets/layouts/11/header-11.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_tools',
            ],

            'header_home_appliances' => [
                'ID' => 'header_home_appliances',
                'title' => esc_html__('Home Appliances Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header12.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header12.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/12',
                'json_url' => get_template_directory_uri() . '/assets/layouts/12/header-12.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_home_appliances',
            ],

            'header_gaming' => [
                'ID' => 'header_gaming',
                'title' => esc_html__('gaming Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header13.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header13.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/13',
                'json_url' => get_template_directory_uri() . '/assets/layouts/13/header-13.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_gaming',
            ],

            'header_perfume' => [
                'ID' => 'header_perfume',
                'title' => esc_html__('Perfume Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header14.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header14.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/14',
                'json_url' => get_template_directory_uri() . '/assets/layouts/14/header-14.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_perfume',
            ],

            'header_handicrafts' => [
                'ID' => 'header_handicrafts',
                'title' => esc_html__('Handicrafts Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header15.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header15.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/15',
                'json_url' => get_template_directory_uri() . '/assets/layouts/15/header-15.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_handicrafts',
            ],

            'header_supermarket' => [
                'ID' => 'header_supermarket',
                'title' => esc_html__('Supermarket Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header16.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header16.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/16',
                'json_url' => get_template_directory_uri() . '/assets/layouts/16/header-16.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_supermarket',
            ],

            'header_digital_2' => [
                'ID' => 'header_digital_2',
                'title' => esc_html__('Digital 2 Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header17.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header17.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/17',
                'json_url' => get_template_directory_uri() . '/assets/layouts/17/header-17.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_digital_2',
            ],

            'header_books' => [
                'ID' => 'header_books',
                'title' => esc_html__('Book Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header18.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header18.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/18',
                'json_url' => get_template_directory_uri() . '/assets/layouts/18/header-18.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_books',
            ],

            'header_laptop' => [
                'ID' => 'header_laptop',
                'title' => esc_html__('Laptop Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header19.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header19.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/19',
                'json_url' => get_template_directory_uri() . '/assets/layouts/19/header-19.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_laptop',
            ],

            'header_toys' => [
                'ID' => 'header_toys',
                'title' => esc_html__('Toy Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header20.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header20.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/20',
                'json_url' => get_template_directory_uri() . '/assets/layouts/20/header-20.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_toys',
            ],

            'header_carpet' => [
                'ID' => 'header_carpet',
                'title' => esc_html__('Carpet Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header21.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header21.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/21',
                'json_url' => get_template_directory_uri() . '/assets/layouts/21/header-21.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_carpet',
            ],

            'header_leather' => [
                'ID' => 'header_leather',
                'title' => esc_html__('Leather Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header22.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header22.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/22',
                'json_url' => get_template_directory_uri() . '/assets/layouts/22/header-22.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_leather',
            ],

            'header_medical' => [
                'ID' => 'header_medical',
                'title' => esc_html__('Medical Store Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header23.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header23.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/23',
                'json_url' => get_template_directory_uri() . '/assets/layouts/24/header-24.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_medical',
            ],

            'header_baby_item' => [
                'ID' => 'header_baby_item',
                'title' => esc_html__('Baby Items Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header24.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header24.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/24',
                'json_url' => get_template_directory_uri() . '/assets/layouts/23/header-23.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_baby_item',
            ],

            'header_cosmetics' => [
                'ID' => 'header_cosmetics',
                'title' => esc_html__('Cosmetics Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header25.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header25.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/25',
                'json_url' => get_template_directory_uri() . '/assets/layouts/25/header-25.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_cosmetics',
            ],

            'header_camera' => [
                'ID' => 'header_camera',
                'title' => esc_html__('Camera Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header26.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header26.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/26',
                'json_url' => get_template_directory_uri() . '/assets/layouts/26/header-26.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_camera',
            ],

            'header_digikala' => [
                'ID' => 'header_digikala',
                'title' => esc_html__('Digikala Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header27.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header27.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/27',
                'json_url' => get_template_directory_uri() . '/assets/layouts/27/header-27.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_digikala',
            ],

            'header_plumbing_fixtures' => [
                'ID' => 'header_plumbing_fixtures',
                'title' => esc_html__('Plumbing Fixtures Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header28.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header28.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/28',
                'json_url' => get_template_directory_uri() . '/assets/layouts/28/header-28.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_plumbing_fixtures',
            ],

            'header_beauty' => [
                'ID' => 'header_beauty',
                'title' => esc_html__('Beauty Header', 'kavehTheme'),
                'thumbnail' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header29.png',
                'preview' => ['url' => 'https://s9.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header29.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/29',
                'json_url' => get_template_directory_uri() . '/assets/layouts/29/header-29.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_beauty',
            ],

            'header_gift_shop' => [
                'ID' => 'header_gift_shop',
                'title' => esc_html__('Gift Shop Header', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header30.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header30.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/30',
                'json_url' => get_template_directory_uri() . '/assets/layouts/30/header-30.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_gift_shop',
            ],

            'header_clothing_and_fashion' => [
                'ID' => 'header_clothing_and_fashion',
                'title' => esc_html__('Clothing & Fashion Header', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header31.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header31.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/31',
                'json_url' => get_template_directory_uri() . '/assets/layouts/31/header-31.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_clothing_and_fashion',
            ],

            'header_flowers' => [
                'ID' => 'header_flowers',
                'title' => esc_html__('Flowers & Plants Header', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header32.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header32.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/32',
                'json_url' => get_template_directory_uri() . '/assets/layouts/32/header-32.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_flowers',
            ],

            'header_apple_nic' => [
                'ID' => 'header_apple_nic',
                'title' => esc_html__('Apple NIC Header', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header33.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header33.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/33',
                'json_url' => get_template_directory_uri() . '/assets/layouts/33/header-33.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_apple_nic',
            ],

            'header_digi_style' => [
                'ID' => 'header_digi_style',
                'title' => esc_html__('Digi Style Header', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header34.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header34.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/34',
                'json_url' => get_template_directory_uri() . '/assets/layouts/34/header-34.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_digi_style',
            ],

            'header_bani_mode' => [
                'ID' => 'header_bani_mode',
                'title' => esc_html__('Bani Mode Header', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header35.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/header35.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/35',
                'json_url' => get_template_directory_uri() . '/assets/layouts/35/header-35.json',
                'package' => 'free',
                'category' => ['header'],
                'get_searchable_unique_name' => 'header_bani_mode',
            ],



            //////////////////////////////////// Footer ////////////////////////////////////

            'footer_digital' => [
                'ID' => 'footer_digital',
                'title' => esc_html__('Digital Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer1.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer1.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/1',
                'json_url' => get_template_directory_uri() . '/assets/layouts/1/footer-1.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_digital',
            ],

            'footer_furniture' => [
                'ID' => 'footer_furniture',
                'title' => esc_html__('Furniture Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer2.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer2.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/2',
                'json_url' => get_template_directory_uri() . '/assets/layouts/2/footer-2.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_furniture',
            ],

            'footer_accessories' => [
                'ID' => 'footer_accessories',
                'title' => esc_html__('Accessories Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer3.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer3.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/3',
                'json_url' => get_template_directory_uri() . '/assets/layouts/3/footer-3.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_accessories',
            ],

            'footer_fashion' => [
                'ID' => 'footer_fashion',
                'title' => esc_html__('Fashion Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer4.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer4.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/4',
                'json_url' => get_template_directory_uri() . '/assets/layouts/4/footer-4.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_fashion',
            ],

            'footer_petshop' => [
                'ID' => 'footer_petshop',
                'title' => esc_html__('Pet Shop Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer5.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer5.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/5',
                'json_url' => get_template_directory_uri() . '/assets/layouts/5/footer-5.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_petshop',
            ],

            'footer_sports' => [
                'ID' => 'footer_sports',
                'title' => esc_html__('Sports Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer6.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer6.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/6',
                'json_url' => get_template_directory_uri() . '/assets/layouts/6/footer-6.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_sports',
            ],

            'footer_supplements' => [
                'ID' => 'footer_supplements',
                'title' => esc_html__('Sports Supplements Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer7.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer7.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/7',
                'json_url' => get_template_directory_uri() . '/assets/layouts/7/footer-7.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_supplements',
            ],

            'footer_outdoor' => [
                'ID' => 'footer_outdoor',
                'title' => esc_html__('Outdoor Equipment Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer8.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer8.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/8',
                'json_url' => get_template_directory_uri() . '/assets/layouts/8/footer-8.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_outdoor',
            ],

            'footer_gaming' => [
                'ID' => 'footer_gaming',
                'title' => esc_html__('Gaming Console Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer9.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer9.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/9',
                'json_url' => get_template_directory_uri() . '/assets/layouts/9/footer-9.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_gaming',
            ],

            'footer_home_appliances' => [
                'ID' => 'footer_home_appliances',
                'title' => esc_html__('Home Appliances Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer10.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer10.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/10',
                'json_url' => get_template_directory_uri() . '/assets/layouts/10/footer-10.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_home_appliances',
            ],

            'footer_tools' => [
                'ID' => 'footer_tools',
                'title' => esc_html__('Tools Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer11.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer11.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/11',
                'json_url' => get_template_directory_uri() . '/assets/layouts/11/footer-11.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_tools',
            ],

            'footer_home_appliances' => [
                'ID' => 'footer_home_appliances',
                'title' => esc_html__('Home Appliances Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer12.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer12.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/12',
                'json_url' => get_template_directory_uri() . '/assets/layouts/12/footer-12.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_home_appliances',
            ],

            'footer_gaming' => [
                'ID' => 'footer_gaming',
                'title' => esc_html__('Gaming Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer13.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer13.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/13',
                'json_url' => get_template_directory_uri() . '/assets/layouts/13/footer-13.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_gaming',
            ],

            'footer_perfume' => [
                'ID' => 'footer_perfume',
                'title' => esc_html__('Perfume Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer14.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer14.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/14',
                'json_url' => get_template_directory_uri() . '/assets/layouts/14/footer-14.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_perfume',
            ],

            'footer_handicrafts' => [
                'ID' => 'footer_handicrafts',
                'title' => esc_html__('Handicrafts Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer15.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer15.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/15',
                'json_url' => get_template_directory_uri() . '/assets/layouts/15/footer-15.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_handicrafts',
            ],

            'footer_supermarket' => [
                'ID' => 'footer_supermarket',
                'title' => esc_html__('Supermarket Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer16.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer16.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/16',
                'json_url' => get_template_directory_uri() . '/assets/layouts/16/footer-16.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_supermarket',
            ],

            'footer_digital_2' => [
                'ID' => 'footer_digital_2',
                'title' => esc_html__('Digital 2 Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer17.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer17.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/17',
                'json_url' => get_template_directory_uri() . '/assets/layouts/17/footer-17.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_digital_2',
            ],

            'footer_books' => [
                'ID' => 'footer_books',
                'title' => esc_html__('Book Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer18.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer18.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/18',
                'json_url' => get_template_directory_uri() . '/assets/layouts/18/footer-18.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_books',
            ],

            'footer_laptop' => [
                'ID' => 'footer_laptop',
                'title' => esc_html__('Laptop Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer19.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer19.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/19',
                'json_url' => get_template_directory_uri() . '/assets/layouts/19/footer-19.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_laptop',
            ],

            'footer_toys' => [
                'ID' => 'footer_toys',
                'title' => esc_html__('Toy Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer20.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer20.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/20',
                'json_url' => get_template_directory_uri() . '/assets/layouts/20/footer-20.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_toys',
            ],

            'footer_carpet' => [
                'ID' => 'footer_carpet',
                'title' => esc_html__('Carpet Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer21.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer21.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/21',
                'json_url' => get_template_directory_uri() . '/assets/layouts/21/footer-21.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_carpet',
            ],

            'footer_leather' => [
                'ID' => 'footer_leather',
                'title' => esc_html__('Leather Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer22.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer22.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/22',
                'json_url' => get_template_directory_uri() . '/assets/layouts/22/footer-22.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_leather',
            ],

            'footer_medical' => [
                'ID' => 'footer_medical',
                'title' => esc_html__('Medical Store Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer23.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer23.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/23',
                'json_url' => get_template_directory_uri() . '/assets/layouts/24/footer-24.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_medical',
            ],

            'footer_baby_item' => [
                'ID' => 'footer_baby_item',
                'title' => esc_html__('Baby Items Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer24.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer24.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/24',
                'json_url' => get_template_directory_uri() . '/assets/layouts/23/footer-23.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_baby_item',
            ],

            'footer_cosmetics' => [
                'ID' => 'footer_cosmetics',
                'title' => esc_html__('Cosmetics Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer25.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer25.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/25',
                'json_url' => get_template_directory_uri() . '/assets/layouts/25/footer-25.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_cosmetics',
            ],

            'footer_camera' => [
                'ID' => 'footer_camera',
                'title' => esc_html__('Camera Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer26.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer26.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/26',
                'json_url' => get_template_directory_uri() . '/assets/layouts/26/footer-26.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_camera',
            ],

            'footer_digikala' => [
                'ID' => 'footer_digikala',
                'title' => esc_html__('Digikala Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer27.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer27.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/27',
                'json_url' => get_template_directory_uri() . '/assets/layouts/27/footer-27.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_digikala',
            ],

            'footer_plumbing_fixtures' => [
                'ID' => 'footer_plumbing_fixtures',
                'title' => esc_html__('Plumbing Fixtures Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer28.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer28.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/28',
                'json_url' => get_template_directory_uri() . '/assets/layouts/28/footer-28.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_plumbing_fixtures',
            ],

            'footer_beauty' => [
                'ID' => 'footer_beauty',
                'title' => esc_html__('Beauty Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer29.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer29.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/29',
                'json_url' => get_template_directory_uri() . '/assets/layouts/29/footer-29.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_beauty',
            ],

            'footer_gift_shop' => [
                'ID' => 'footer_gift_shop',
                'title' => esc_html__('Gift Shop Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer30.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer30.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/30',
                'json_url' => get_template_directory_uri() . '/assets/layouts/30/footer-30.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_gift_shop',
            ],

            'footer_clothing_and_fashion' => [
                'ID' => 'footer_clothing_and_fashion',
                'title' => esc_html__('Clothing & Fashion Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer31.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer31.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/31',
                'json_url' => get_template_directory_uri() . '/assets/layouts/31/footer-31.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_clothing_and_fashion',
            ],

            'footer_flowers' => [
                'ID' => 'footer_flowers',
                'title' => esc_html__('Flowers & Plants Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer32.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer32.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/32',
                'json_url' => get_template_directory_uri() . '/assets/layouts/32/footer-32.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_flowers',
            ],

            'footer_apple_nic' => [
                'ID' => 'footer_apple_nic',
                'title' => esc_html__('Apple NIC Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer33.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer33.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/33',
                'json_url' => get_template_directory_uri() . '/assets/layouts/33/footer-33.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_apple_nic',
            ],

            'footer_digi_style' => [
                'ID' => 'footer_digi_style',
                'title' => esc_html__('Digi Style Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer34.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer34.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/34',
                'json_url' => get_template_directory_uri() . '/assets/layouts/34/footer-34.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_digi_style',
            ],

            'footer_bani_mode' => [
                'ID' => 'footer_bani_mode',
                'title' => esc_html__('Bani Mode Footer', 'kavehTheme'),
                'thumbnail' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer35.png',
                'preview' => ['url' => 'https://s31.uupload.ir/files/garousiamir/kaveh/imgdemokaveh/footer35.png'],
                'live_demo_url' => 'https://kaveh.moeinwp.com/35',
                'json_url' => get_template_directory_uri() . '/assets/layouts/35/footer-35.json',
                'package' => 'free',
                'category' => ['footer'],
                'get_searchable_unique_name' => 'footer_bani_mode',
            ],

            
            

        

        ];
    }
    

	public function render_popup_html() {
        if ( ! did_action( 'elementor/loaded' ) ) {
            return ;
        }
		if ( \Elementor\Plugin::instance()->editor->is_edit_mode() || isset($_GET['elementor-preview']) ) {
			$path = get_stylesheet_directory() . '/template-part/popup-kaveh-library.php';
			if ( file_exists( $path ) ) {
				include $path;
			}
		}
	}

	public function register_ajax_actions(Ajax $ajax) {
		$ajax->register_ajax_action(
			'get_kaveh_template_data',
			function( $data ) {
				if ( ! current_user_can( 'edit_posts' ) ) {
					throw new \Exception( 'Access Denied' );
				}

				if ( ! empty( $data['editor_post_id'] ) ) {
					$editor_post_id = absint( $data['editor_post_id'] );
					if ( ! get_post( $editor_post_id ) ) {
						throw new \Exception( __('Post not found', 'kaveh-elementor') );
					}
					\Elementor\Plugin::instance()->db->switch_to_post( $editor_post_id );
				}

				if ( empty( $data['template_id'] ) ) {
					throw new \Exception( __('Template ID is missing', 'kaveh-elementor') );
				}

				return $this->fetch_template_data( $data );
			}
		);
	}

	private function fetch_template_data( array $args ) {
		if ( empty( $args['template_id'] ) ) {
			throw new \Exception( 'No template ID provided' );
		}

		$template_url = esc_url_raw( $args['template_id'] );

		$response = wp_remote_get( $template_url );
		if ( is_wp_error( $response ) ) {
			throw new \Exception( 'Failed to fetch template data' );
		}

		$body = wp_remote_retrieve_body( $response );
		$data = json_decode( $body, true );

		if ( empty( $data ) || ! is_array( $data ) ) {
			throw new \Exception( 'Invalid template format' );
		}

		return $data;
	}




    
}
