<?php

$elements = [
    'content-elements'  => [
        'title' => __( 'Content Elements', 'essential-addons-for-elementor-lite'),
        'elements'  => [
            [
                'key'   => 'creative-btn',
                'title' => __( 'Creative Button', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/creative-buttons/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/creative-elements/ea-countdown/',
            ],
            [
                'key'   => 'team-members',
                'title' => __( 'Team Member', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/team-members/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/team-members/',
            ],
            [
                'key'   => 'testimonials',
                'title' => __( 'Testimonial', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/testimonials/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/testimonials/',
            ],
            [
                'key'   => 'flip-box',
                'title' => __( 'Flip Box', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/flip-box/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/flip-box/',
            ],
            [
                'key'   => 'info-box',
                'title' => __( 'Info Box', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/info-box/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/info-box/',
            ],
            [
                'key'   => 'dual-header',
                'title' => __( 'Dual Color Heading', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/dual-color-headline/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/dual-color-headline/',
            ],
            [
                'key'   => 'tooltip',
                'title' => __( 'Tooltip', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/tooltip/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/tooltip/',
            ],
            [
                'key'   => 'adv-accordion',
                'title' => __( 'Advanced Accordion', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/advanced-accordion/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/advanced-accordion/',
            ],
            [
                'key'   => 'adv-tabs',
                'title' => __( 'Advanced Tabs', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/advanced-tabs/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/advanced-tabs/',
            ],
            [
                'key'   => 'feature-list',
                'title' => __( 'Feature List', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/feature-list/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/ea-feature-list/',
            ],
            [
                'key'    => 'offcanvas',
                'title'  => __( 'Offcanvas', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/offcanvas-content/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/essential-addons-elementor-offcanvas/',
                'is_pro' => true
            ],
            [
                'key'    => 'advanced-menu',
                'title'  => __( 'Advanced Menu', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/advanced-menu/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/ea-advanced-menu/',
                'is_pro' => true
            ],
            [
                'key'    => 'toggle',
                'title'  => __( 'Toggle', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/content-toggle/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/content-toggle/',
                'is_pro' => true
            ],
            [
                'key'    => 'testimonial-slider',
                'title'  => __( 'Testimonial Slider', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/testimonial-slider/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/testimonial-slider/',
                'is_pro' => true
            ],
            [
                'key'    => 'static-product',
                'title'  => __( 'Static Product', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/static-product/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/static-product/',
                'is_pro' => true
            ],
            [
                'key'    => 'team-member-carousel',
                'title'  => __( 'Team Member Carousel', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/team-member-carousel/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/team-member-carousel/',
                'is_pro' => true
            ],
            [
                'key'   => 'sticky-video',
                'title' => __( 'Sticky Video', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/sticky-video/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/sticky-video/',
            ],
            [
                'key'   => 'event-calendar',
                'title' => __( 'Event Calendar', 'essential-addons-elementor' ),
                'demo_link' => 'https://essential-addons.com/elementor/event-calendar/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/event-calendar/',
            ],
            [
                'key'   => 'simple-menu',
                'title' => __( 'Simple Menu', 'essential-addons-elementor' ),
                'demo_link' => 'https://essential-addons.com/elementor/simple-menu/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/simple-menu/',
            ],
        ]
    ],
    'dynamic-content-elements'  => [
        'title' => __( 'Dynamic Content Elements', 'essential-addons-for-elementor-lite'),
        'elements'  => [
            [
                'key'   => 'post-grid',
                'title' => __( 'Post Grid', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/post-grid/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/post-grid/',
            ],
            [
                'key'   => 'post-timeline',
                'title' => __( 'Post Timeline', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/post-timeline/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/post-timeline/',
            ],
            [
                'key'   => 'data-table',
                'title' => __( 'Data Table', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/table/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/data-table/',
            ],
            [
                'key'   => 'advanced-data-table',
                'title' => __( 'Advanced Data Table', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/advanced-data-table/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/advanced-data-table/',
            ],
            [
                'key'   => 'content-ticker',
                'title' => __( 'Content Ticker', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/content-ticker/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/content-ticker/',
            ],
            [
                'key'   => 'adv-google-map',
                'title' => __( 'Advanced Google Map', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/advanced-google-map/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/advanced-google-map/',
                'is_pro' => true
            ],
            [
                'key'    => 'post-block',
                'title'  => __( 'Post Block', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/post-block/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/post-block/',
                'is_pro' => true
            ],
            [
                'key'    => 'post-carousel',
                'title'  => __( 'Post Carousel', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/post-carousel/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/post-carousel/',
                'is_pro' => true
            ],
            [
                'key'    => 'post-list',
                'title'  => __( 'Smart Post List', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/post-list/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/smart-post-list/',
                'is_pro' => true
            ],
            [
                'key'    => 'content-timeline',
                'title'  => __( 'Content Timeline', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/content-timeline/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/content-timeline/',
                'is_pro' => true
            ],
            [
                'key'    => 'dynamic-filter-gallery',
                'title'  => __( 'Dynamic Gallery', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/filterable-gallery/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/dynamic-filterable-gallery/',
                'is_pro' => true
            ]
        ]
    ],
    'creative-elements' => [
        'title' => __( 'Creative Elements', 'essential-addons-for-elementor-lite'),
        'elements'  => [
            [
                'key'   => 'count-down',
                'title' => __( 'Countdown', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/countdown/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/creative-elements/ea-countdown/',
            ],
            [
                'key'   => 'fancy-text',
                'title' => __( 'Fancy Text', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/fancy-text/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/fancy-text/',
            ],
            [
                'key'   => 'filter-gallery',
                'title' => __( 'Filterable Gallery', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/filterable-gallery/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/filterable-gallery/',
            ],
            [
                'key'    => 'image-accordion',
                'title'  => __( 'Image Accordion', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/image-accordion/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/image-accordion/',
            ],
            [
                'key'   => 'progress-bar',
                'title' => __( 'Progress Bar', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/progress-bar/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/progress-bar/',
            ],
            [
                'key'    => 'interactive-promo',
                'title'  => __( 'Interactive Promo', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/interactive-promo/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/interactive-promo/',
                'is_pro' => true
            ],
            [
                'key'    => 'counter',
                'title'  => __( 'Counter', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/counter/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/counter/',
                'is_pro' => true
            ],
            [
                'key'    => 'lightbox',
                'title'  => __( 'Lightbox & Modal', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/lightbox-modal/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/lightbox-modal/',
                'is_pro' => true
            ],
            [
                'key'    => 'protected-content',
                'title'  => __( 'Protected Content', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/protected-content/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/ea-protected-content/',
                'is_pro' => true
            ],
            [
                'key'    => 'img-comparison',
                'title'  => __( 'Image Comparison', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/image-comparison/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/image-comparison/',
                'is_pro' => true
            ],
            [
                'key'    => 'flip-carousel',
                'title'  => __( 'Flip Carousel', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/flip-carousel/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/flip-carousel/',
                'is_pro' => true
            ],
            [
                'key'    => 'logo-carousel',
                'title'  => __( 'Logo Carousel', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/logo-carousel/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/logo-carousel/',
                'is_pro' => true
            ],
            [
                'key'    => 'interactive-cards',
                'title'  => __( 'Interactive Cards', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/interactive-cards/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/interactive-cards/',
                'is_pro' => true
            ],
            [
                'key'    => 'one-page-navigation',
                'title'  => __( 'One Page Navigation', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/one-page-nav/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/one-page-navigation/',
                'is_pro' => true
            ],
            [
                'key'    => 'image-hotspots',
                'title'  => __( 'Image Hotspots', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/image-hotspots/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/image-hotspots/',
                'is_pro' => true
            ],
            [
                'key'    => 'divider',
                'title'  => __( 'Divider', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/divider/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/divider/',
                'is_pro' => true
            ],
            [
                'key'    => 'image-scroller',
                'title'  => __( 'Image Scroller', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/image-scroller/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/ea-image-scroller/',
                'is_pro' => true
            ]
        ]
    ],
    'marketing-elements'    => [
        'title' => __( 'Marketing Elements', 'essential-addons-for-elementor-lite'),
        'elements'  => [
            [
                'key'   => 'call-to-action',
                'title' => __( 'Call To Action', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/call-to-action/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/call-to-action/',
            ],
            [
                'key'   => 'price-table',
                'title' => __( 'Pricing Table', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/pricing-table/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/pricing-table/',
            ],
            [
                'key'    => 'price-menu',
                'title'  => __( 'Price menu', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/price-menu/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/price-menu/',
                'is_pro' => true
            ]
        ]
    ],
    'form-styler-elements'  => [
        'title' => __( 'Form Styler Elements', 'essential-addons-for-elementor-lite'),
        'elements'  => [
            [
                'key'   => 'contact-form-7',
                'title' => __( 'Contact Form 7', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/contact-form-7/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/contact-form-7/',
            ],
            [
                'key'   => 'weforms',
                'title' => __( 'weForms', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/weforms/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/weforms/',
            ],
            [
                'key'   => 'ninja-form',
                'title' => __( 'Ninja Form', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/ninja-forms/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/ninja-forms/',
            ],
            [
                'key'   => 'gravity-form',
                'title' => __( 'Gravity Form', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/gravity-forms/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/gravity-forms/',
            ],
            [
                'key'   => 'caldera-form',
                'title' => __( 'Caldera Form', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/caldera-forms/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/caldera-forms/',
            ],
            [
                'key'   => 'wpforms',
                'title' => __( 'WPForms', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/wpforms/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/wpforms/',
            ],
            [
                'key'   => 'fluentform',
                'title' => __( 'FluentForm', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/fluent-forms/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/fluent-form/',
            ],
            [
                'key'   => 'formstack',
                'title' => __( 'Formstack', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/formstack/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/formstack/',
            ],
            [
                'key'   => 'typeform',
                'title' => __( 'Typeform', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/typeform/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/typeform/',
            ],
            [
                'key'    => 'mailchimp',
                'title'  => __( 'Mailchimp', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/mailchimp/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/mailchimp/',
                'is_pro' => true
            ],
	        [
		        'key'   => 'login-register',
		        'title' => __( 'Login Register Form', 'essential-addons-elementor' ),
		        'demo_link' => 'https://essential-addons.com/elementor/login-register-form',
		        'doc_link' => 'https://essential-addons.com/elementor/docs/login-register-form/',
	        ],
        ]
    ],
    'social-feed-elements'  => [
        'title' => __( 'Social Feed Elemens', 'essential-addons-for-elementor-lite'),
        'elements'  => [
            [
                'key'   => 'twitter-feed',
                'title' => __( 'Twitter Feed', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/twitter-feed/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/twitter-feed/',
            ],
            [
                'key'    => 'twitter-feed-carousel',
                'title'  => __( 'Twitter Feed Carousel', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/twitter-feed/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/twitter-feed-carousel/',
                'is_pro' => true
            ],
            [
                'key'    => 'instagram-gallery',
                'title'  => __( 'Instagram Feed', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/instagram-feed/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/instagram-feed/',
                'is_pro' => true
            ],
            [
                'key'    => 'facebook-feed',
                'title'  => __( 'Facebook Feed', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/facebook-feed/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/facebook-feed/',
            ],
        ]
    ],
    'learn-dash-elements'   => [
        'title' => __( 'LearnDash Elements', 'essential-addons-for-elementor-lite'),
        'elements'  => [
            [
                'key'   => 'learn-dash-course-list',
                'title' => __( 'LearnDash Course List', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/learndash-course-list/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/learndash-course-list/',
                'is_pro' => true
            ]
        ]
    ],
    'documentation-elements'   => [
        'title' => __( 'Documentation Elements', 'essential-addons-for-elementor-lite'),
        'elements'  => [
            [
                'key'   => 'betterdocs-category-grid',
                'title' => __( 'BetterDocs Category Grid', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/betterdocs-category-grid/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/betterdocs-category-grid/'
            ],
            [
                'key'   => 'betterdocs-category-box',
                'title' => __( 'BetterDocs Category Box', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/betterdocs-category-box/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/betterdocs-category-box/'
            ],
            [
                'key'   => 'betterdocs-search-form',
                'title' => __( 'BetterDocs Search Form', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/betterdocs-search-form/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/betterdocs-search-form/'
            ]
        ]
    ],
    'woocommerce-elements'   => [
        'title' => __( 'WooCommerce Elements', 'essential-addons-for-elementor-lite'),
        'elements'  => [
            [
                'key'    => 'product-grid',
                'title'  => __( 'Product Grid', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/woo-product-grid/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/woocommerce-product-grid/',
            ],
            [
                'key'    => 'woo-collections',
                'title'  => __( 'Woo Product Collections', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/woocommerce-product-collections/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/ea-woo-product-collections/',
                'is_pro' => true
            ],
            [
                'key'   => 'woo-product-slider',
                'title' => __( 'Woo Product Slider', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/woo-product-slider/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/woo-product-slider/',
                'is_pro' => true
            ],
            [
                'key'   => 'woo-product-carousel',
                'title' => __( 'Woo Product Carousel', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/woo-product-carousel/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/woo-product-carousel/'
            ],
            [
                'key'   => 'woo-checkout',
                'title' => __( 'Woo Checkout', 'essential-addons-for-elementor-lite'),
                'demo_link' => 'https://essential-addons.com/elementor/woo-checkout/',
                'doc_link' => 'https://essential-addons.com/elementor/docs/woo-checkout/'
            ],
	        [
		        'key'   => 'woo-product-compare',
		        'title' => __( 'Woo Product Compare', 'essential-addons-for-elementor-lite'),
		        'demo_link' => 'https://essential-addons.com/elementor/woo-product-compare/',
		        'doc_link' => 'https://essential-addons.com/elementor/docs/woo-product-compare/'
	        ],
        ]
    ]
];

$elements = apply_filters( 'add_eael_elementor_addons', $elements );

?>
<div id="elements" class="eael-settings-tab eael-elements-list">
    <div class="row">
        <div class="col-full">
            <div class="elements-global-control-wrap">
                <h4><?php _e('Global Control') ?></h4>
                <p><?php _e('Use the Buttons to Activate or Deactivate all the Elements of Essential Addons at once.') ?></p>

                <div class="eael-btn-group">
                    <button type="button" class="eael-btn eael-global-control-enable"><?php _e('Enable All') ?></button>
                    <button type="button" class="eael-btn eael-global-control-disable"><?php _e('Disable All') ?></button>
                </div>
            </div>
            <?php foreach($elements as $element) : ?>
                <?php echo !empty($element['title']) ? '<h4>'.$element['title'].'</h4>' : ''; ?>

                <div class="eael-checkbox-container">
                    <?php
                        foreach($element['elements'] as $item) {
                            $status = isset($item['is_pro']) && !$this->pro_enabled ? 'disabled' : checked( 1, $this->get_settings($item['key']), false );
                            $label_class = isset($item['is_pro']) && !$this->pro_enabled ? 'eael-get-pro' : '';
                            $class = isset($item['class']) ? ' '.$item['class'] : '';
                        ?>
                        <div class="eael-checkbox<?php echo $class; ?>">
                            <div class="eael-elements-info">
                                <p class="eael-el-title">
                                    <?php _e( $item['title'], 'essential-addons-for-elementor-lite') ?>
                                    <?php echo isset( $item['is_pro'] ) && !$this->pro_enabled ? '<sup class="pro-label">'.__('Pro', 'essential-addons-for-elementor-lite').'</sup>' : ''; ?>
                                    <?php
                                        if ($item['key'] === 'mailchimp' && $this->pro_enabled) {
                                            echo '<span style="font-size: 12px; font-style:italic;"><a href="#" class="eael-admin-settings-popup" data-title="Mailchimp API Key" data-placeholder="Set API Key" data-target="#mailchimp-api">'.__('Settings', 'essential-addons-for-elementor-lite').'</a></span>
                                            <input type="hidden" name="mailchimp-api" id="mailchimp-api" class="mailchimp-api" placeholder="Set API Key" value="' . get_option('eael_save_mailchimp_api') . '">';
                                        } elseif($item['key'] === 'adv-google-map' && $this->pro_enabled) {
                                            echo '<span style="font-size: 12px; font-style:italic;"><a href="#" class="eael-admin-settings-popup" data-title="Google Map API Key" data-placeholder="Set API Key" data-target="#google-map-api">'.__('Settings', 'essential-addons-for-elementor-lite').'</a></span>
                                            <input type="hidden" name="google-map-api" id="google-map-api" class="google-map-api" value="' . get_option('eael_save_google_map_api') . '">';
                                        } elseif($item['key'] === 'typeform') {
                                            $query_param = [
                                                'pr_code'      => wp_hash('eael_typeform'),
                                                'redirect_uri' => esc_url(admin_url( 'admin.php?page=eael-settings' ))
                                            ];
                                            $url = esc_url( add_query_arg( $query_param, esc_url('https://app.essential-addons.com/typeform/index.php') ) );
                                            echo '<span style="font-size: 12px; font-style:italic;">
                                            '.sprintf("<a target='_blank' id='' href='%s'>Get Access</a>", esc_url($url)).'
                                            </span>';
                                        } elseif ($item['key'] === 'login-register') {
                                            $eael_recaptcha_sitekey = get_option('eael_recaptcha_sitekey');
                                            $eael_recaptcha_secret = get_option('eael_recaptcha_secret');
                                            $eael_g_client_id = get_option('eael_g_client_id');
                                            $eael_fb_app_id = get_option('eael_fb_app_id');
                                            $eael_fb_app_secret = get_option('eael_fb_app_secret');
                                            echo '<span style="font-size: 12px; font-style:italic;"><a href="#" class="eael-admin-settings-popup-extended" id="eael-admin-settings-popup-extended" data-settings-id="lr_settings_data">'.__('Settings', 'essential-addons-for-elementor-lite').'</a></span>';
                                            ?>
                                <span class="eael-lr-settings-data" id="lr_settings_data" style="display: none" data-pro-enabled="<?php echo $this->pro_enabled ?>" data-r-sitekey="<?php echo esc_attr($eael_recaptcha_sitekey);?>" data-r-secret="<?php echo esc_attr($eael_recaptcha_secret);?>"  data-g-client-id="<?php echo esc_attr($eael_g_client_id);?>" data-fb-app-id="<?php echo esc_attr($eael_fb_app_id);?>" data-fb-app-secret="<?php echo esc_attr($eael_fb_app_secret);?>" >
                                </span>
                                    <?php } ?>
                                </p>
                                <?php if (!empty( $item['demo_link'])) { ?>
                                <a  class="eael-element-info-link" href="<?php echo esc_attr( esc_url( $item['demo_link'] ) );?>" target="_blank">
                                    <span class="ea-view-demo"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path d="M 5 4 C 3.895 4 3 4.895 3 6 L 3 20 C 3 21.105 3.895 22 5 22 L 12.75 22 L 12.25 24 L 11 24 A 1.0001 1.0001 0 1 0 11 26 L 19 26 A 1.0001 1.0001 0 1 0 19 24 L 17.75 24 L 17.25 22 L 25 22 C 26.105 22 27 21.105 27 20 L 27 6 C 27 4.895 26.105 4 25 4 L 5 4 z M 5 6 L 25 6 L 25 18 L 5 18 L 5 6 z M 15 19 C 15.552 19 16 19.448 16 20 C 16 20.552 15.552 21 15 21 C 14.448 21 14 20.552 14 20 C 14 19.448 14.448 19 15 19 z"></path></svg></span>
                                    <span class="eael-info-tooltip"><?php esc_html_e('Demo', 'essential-addons-elementor'); ?></span>
                                </a>
	                            <?php } ?>
	                            <?php if (!empty( $item['doc_link'])) { ?>
                                <a class="eael-element-info-link" href="<?php echo esc_attr( esc_url( $item['doc_link'] ) );?>" target="_blank">
                                    <span class="ea-get-help"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M 12 2 C 6.4889971 2 2 6.4889971 2 12 C 2 17.511003 6.4889971 22 12 22 C 17.511003 22 22 17.511003 22 12 C 22 6.4889971 17.511003 2 12 2 z M 12 4 C 16.430123 4 20 7.5698774 20 12 C 20 16.430123 16.430123 20 12 20 C 7.5698774 20 4 16.430123 4 12 C 4 7.5698774 7.5698774 4 12 4 z M 12 6 C 9.79 6 8 7.79 8 10 L 10 10 C 10 8.9 10.9 8 12 8 C 13.1 8 14 8.9 14 10 C 14 12 11 12.367 11 15 L 13 15 C 13 13.349 16 12.5 16 10 C 16 7.79 14.21 6 12 6 z M 11 16 L 11 18 L 13 18 L 13 16 L 11 16 z"></path></svg></span>
                                    <span class="eael-info-tooltip"><?php esc_html_e('Documentation', 'essential-addons-elementor'); ?></span>
                                </a>
	                            <?php } ?>
                            </div>
                            <input type="checkbox" id="<?php echo esc_attr($item['key']); ?>" name="<?php echo esc_attr($item['key']); ?>" <?php echo esc_html( $status ); ?>>
                            <label for="<?php echo esc_attr($item['key']); ?>" class="<?php echo esc_attr( $label_class ); ?>"></label>
                        </div>
                    <?php } ?>
                </div>
            <?php endforeach; ?>

            <!-- hidden input -->
            <input type="hidden" name="embedpress" value="on">
            <input type="hidden" name="woocommerce-review" value="on">
            <input type="hidden" name="career-page" value="on">
            <input type="hidden" name="crowdfundly-single-campaign" value="on">
            <input type="hidden" name="crowdfundly-organization" value="on">
            <input type="hidden" name="crowdfundly-all-campaign" value="on">

            <div class="eael-save-btn-wrap">
                <button type="submit" class="button eael-btn js-eael-settings-save"><?php esc_html_e('Save settings', 'essential-addons-for-elementor-lite'); ?></button>
            </div>
        </div>
    </div>
</div>
