<?php
/**
 * Product Stock Widget
 *
 * Displays the stock quantity and status for a product.
 *
 * @package GGM_Commerce
 */

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

require_once __DIR__ . '/widget-product-stock/elementor-render.php';

class GGM_Commerce_Widget_Product_Stock extends \GGM_Commerce_Base_Widget
{

    public function get_name()
    {
        return 'ggmc-product-stock';
    }

    public function get_title()
    {
        return 'Product Stock';
    }

    public function get_icon()
    {
        return 'eicon-number-field';
    }

    protected function register_controls()
    {
        require __DIR__ . '/widget-product-stock/elementor-controls.php';
        require __DIR__ . '/widget-product-stock/elementor-controls-style.php';
    }

    /**
     * The output function for the widget.
     */
    protected function render()
    {
        ggmc_product_stock_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();
    }
}
