<?php

namespace $NAMESPACE$;

use Leandrocfe\FilamentApexCharts\Widgets\ApexChartWidget;

class $CLASS_NAME$ extends ApexChartWidget
{
    /**
     * Chart Id
     *
     * @var string
     */
    protected static ?string $chartId = '$CHART_ID$';

    /**
     * Widget Title
     *
     * @var string|null
     */
    protected static ?string $heading = '$CLASS_NAME$';

    /**
     * Chart options (series, labels, types, size, animations...)
     * https://apexcharts.com/docs/options
     *
     * @return array
     */
    protected function getOptions(): array
    {
        return [
            'chart' => [
                'type' => 'rangeArea',
                'height' => 300,
            ],
            'series' => [
                [
                    'name' => '$CLASS_NAME$',
                    'data' => [
                        ['x' => 'Jan', 'y' => [0, 0]],
                        ['x' => 'Feb', 'y' => [3, 25]],
                        ['x' => 'Mar', 'y' => [5, 30]],
                        ['x' => 'Apr', 'y' => [4, 45]],
                        ['x' => 'May', 'y' => [10, 40]],
                        ['x' => 'Jun', 'y' => [11, 40]],
                        ['x' => 'Jul', 'y' => [20, 55]],
                        ['x' => 'Aug', 'y' => [15, 60]],
                        ['x' => 'Sep', 'y' => [8, 40]],
                        ['x' => 'Oct', 'y' => [7, 30]],
                        ['x' => 'Nov', 'y' => [3, 25]],
                        ['x' => 'Dec', 'y' => [0, 0]],
                    ],
                ],
            ],
            'xaxis' => [
                'labels' => [
                    'style' => [
                        'fontFamily' => 'inherit',
                    ],
                ],
            ],
            'yaxis' => [
                'labels' => [
                    'style' => [
                        'fontFamily' => 'inherit',
                    ],
                ],
            ],
            'colors' => ['#f59e0b'],
            'stroke' => [
                'curve' => 'smooth',
            ],
            'dataLabels' => [
                'enabled' => false,
            ],
        ];
    }
}
