import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
import { ChartData, ChartType } from '../../../../types/src/am-chart';
import { TemplateResult } from 'lit';

/**
 * @summary Charts visually display data using the amCharts v5 charting library, supporting XY (line), bar, and custom chart configurations.
 *
 * @property {string} src - The external source or config to be used for the chart (optional for remote data/config loading).
 * @property {ChartData} data - The chart data and configuration object.
 *   The `ChartData` object consists of:
 *     - `data`: An array containing the data points to visualize. Each data point should be an object with properties matching the series' field requirements (e.g., `{ date: number, value: number }` for time series).
 *     - `config?`: Optional. An amCharts configuration object that defines detailed chart structure, such as series, axes, and their options. Use this for advanced or fully custom amCharts setups.
 *     - `options?`: Optional. Object specifying basic chart settings, used widget-related cases:
 *         - `color`: The main color for the chart lines or fills. This also sets the host element's CSS `color` property.
 *         - `conditions`: Optional array of color rules applied to series based on value ranges (e.g., `{ color: "#ff0000", min: 20, max: 30 }`).
 *         - `dayInterval`: Definition of time unit for the X axis (e.g., 'day', 'week').
 *   If both `options` and `config` are provided, `options` has higher priority.
 *   For simple usage, provide `data` and `options`. For custom layouts, provide `data` and `config`.
 *
 * @property {string} type - The chart type to render: 'xy' (line) or 'bar'. Defaults to 'xy'.
 * @property {boolean} animated - Whether to enable amCharts animated theme.
 *
 * @csspart base - The component’s base wrapper.
 *
 * This component dynamically initializes, updates, and disposes charts using amCharts 5.
 * It responds to changes in `data`, `type`, and `src` properties to keep the rendered chart in sync.
 */
export default class CxAmChart extends CortexElement {
    static readonly styles: import('lit').CSSResult[];
    src: string;
    data: ChartData;
    type: ChartType;
    animated: boolean;
    private root;
    private readonly chartDiv;
    connectedUpdatedCallback(): void;
    disconnectedCallback(): void;
    updateChart(): Promise<void>;
    initChart(): Promise<void>;
    createChart(type: ChartType, data: ChartData, src: string): Promise<void>;
    private createXYChartFromWidgetOptions;
    private createChartFromConfig;
    private createXYChart;
    render(): TemplateResult;
}
