<?php
namespace Unlockafe_addons\Widgets;

use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Repeater;

use function __;

if (!defined('ABSPATH')) exit; // Exit if accessed directly

class Sync_Advantage extends Widget_Base
{
    public function get_name()
    {
        return 'unlockafe-sync-advantage';
    }

    public function get_title()
    {
        return __('Sync Advantage', 'unlock-addons-for-elementor');
    }

    public function get_icon()
    {
        return 'eicon-sync ulicon';
    }

    /**
     * Get widget categories.
     */
    public function get_categories()
    {
        return ['unlockafe-addons'];
    }

    public function get_keywords()
    {
        return ['unlock', 'sync', 'google', 'sheets', 'woocommerce'];
    }

    public function get_style_depends()
    {
        return ['unlockafe-sync-advantage-style'];
    }

    public function get_script_depends()
    {
        return ['unlockafe-sync-advantage-scripts'];
    }

    protected function register_controls()
    {
        $this->start_controls_section(
            'section_content',
            [
                'label' => __('Configuration', 'unlock-addons-for-elementor'),
            ]
        );

        $this->add_control(
            'config_note',
            [
                'type' => \Elementor\Controls_Manager::NOTICE,
                'label' => __('Important Note', 'unlock-addons-for-elementor'),
                'notice_type' => 'info',
                'show_icon' => true,
                'content' => __('This widget enables the WooCommerce to Google Sheets sync. Please go to the admin dashboard under <strong>WooCommerce > Sync Advantage</strong> to configure the settings. This widget has no frontend output.', 'unlock-addons-for-elementor'),
            ]
        );

        $this->end_controls_section();
    }

    protected function render()
    {
        echo "<p>" . esc_html__('This widget enables the WooCommerce to Google Sheets sync. Please go to the admin dashboard under <strong>WooCommerce > Sync Advantage</strong> to configure the settings. This widget has no frontend output.', 'unlock-addons-for-elementor') . "</p>";
    }
} 

