<?php
/**
 * Customer Account Widget
 *
 * A comprehensive widget for customer account management with modular architecture.
 */

// If this file is called directly, abort.
if (!defined('ABSPATH')) {
    exit;
}

// Include required components
require_once plugin_dir_path(__FILE__) . '../data/class-customer-account-data-handler.php';
require_once plugin_dir_path(__FILE__) . 'widget-customer-account/elementor-render.php';

class GGM_Commerce_Widget_Customer_Account extends \GGM_Commerce_Base_Widget {

    public function get_name() {
        return 'ggmc-customer-account';
    }

    public function get_title() {
        return __('Customer Account', 'ggm-commerce');
    }

    public function get_icon() {
        return 'eicon-user-circle-o';
    }

    protected function register_controls() {
        require plugin_dir_path(__FILE__) . 'widget-customer-account/elementor-controls.php';
        require plugin_dir_path(__FILE__) . 'widget-customer-account/elementor-controls-style.php';
    }

    protected function render() {
        ggmc_customer_account_render( $this );
    }

    /**
     * Get default styles for this widget.
     * Uses centralized configuration from default-widget-styles.php.
     */
    public static function get_static_default_styles() {
        return self::get_defaults_from_config();
    }
}
