{
    "description": {
        "author": "Salesforce",
        "text": [
            "Selector: .forceObjectHomeChart",
            "Represents the force:objectHomeChart Aura component (chart panel).",
            "Provides access to chart operations like viewing, editing, and managing chart types."
        ]
    },
    "elements": [
        {
            "name": "chartPicklist",
            "public": true,
            "selector": {
                "css": ".uiInputSelect"
            },
            "type": "utam-aura/pageObjects/inputSelect"
        },
        {
            "name": "closeButton",
            "public": true,
            "selector": {
                "css": ".slds-panel__close"
            },
            "type": "utam-lightning/pageObjects/buttonIcon"
        },
        {
            "name": "settingsTrigger",
            "public": true,
            "selector": {
                "css": ".chartSettings .trigger"
            },
            "type": [
                "actionable",
                "clickable"
            ]
        },
        {
            "name": "settingsMenu",
            "public": true,
            "selector": {
                "css": ".chartSettings .uiMenuList"
            },
            "type": "utam-aura/pageObjects/menuList"
        },
        {
            "name": "eclairChartWrapper",
            "public": true,
            "selector": {
                "css": ".eclairChartWrapper"
            },
            "type": "actionable"
        },
        {
            "name": "spinner",
            "public": true,
            "selector": {
                "css": ".forceInlineSpinner.indicator"
            },
            "type": "utam-force/pageObjects/inlineSpinner"
        },
        {
            "name": "emptyChart",
            "public": true,
            "selector": {
                "css": ".eclairChartWrapper .emptychart"
            },
            "type": "actionable"
        },
        {
            "name": "noChart",
            "public": true,
            "selector": {
                "css": ".noChart"
            },
            "type": "actionable"
        },
        {
            "name": "newChartButtonNoChart",
            "public": true,
            "selector": {
                "css": ".noChart .forceActionButton"
            },
            "type": "utam-force/pageObjects/actionButton"
        },
        {
            "name": "chartData",
            "public": true,
            "selector": {
                "css": ".chartInfo"
            },
            "type": "container"
        },
        {
            "name": "rows",
            "public": true,
            "selector": {
                "css": ".chartInfo li",
                "returnAll": true
            },
            "type": "utam-force/pageObjects/objectHomeChartRow"
        }
    ],
    "methods": [
        {
            "name": "isChartPanelVisible",
            "description": {
                "text": [
                    "Checks if the chart panel wrapper is visible"
                ],
                "return": "true if the chart panel is visible"
            },
            "compose": [
                {
                    "element": "eclairChartWrapper",
                    "apply": "isVisible",
                    "returnType": "boolean"
                }
            ]
        },
        {
            "name": "waitForSpinnerVisible",
            "description": {
                "text": [
                    "Waits for the chart inline spinner to be visible"
                ]
            },
            "compose": [
                {
                    "element": "spinner",
                    "apply": "waitForVisible"
                }
            ]
        },
        {
            "name": "waitForSpinnerAbsence",
            "description": {
                "text": [
                    "Waits for the chart inline spinner to disappear"
                ]
            },
            "compose": [
                {
                    "element": "spinner",
                    "apply": "waitForAbsence"
                }
            ]
        },
        {
            "name": "hasChart",
            "description": {
                "text": [
                    "Checks if the chart panel is present"
                ],
                "return": "true if chart panel is visible, false otherwise"
            },
            "compose": [
                {
                    "element": "eclairChartWrapper",
                    "apply": "isVisible",
                    "returnType": "boolean"
                }
            ]
        },
        {
            "name": "getNoChartMessage",
            "description": {
                "text": [
                    "Gets the message displayed when no chart is available"
                ],
                "return": "the no chart message text"
            },
            "compose": [
                {
                    "element": "noChart",
                    "apply": "getText"
                }
            ]
        },
        {
            "name": "isEmptyChart",
            "description": {
                "text": [
                    "Checks if the chart is empty (showing empty chart message)"
                ],
                "return": "true if chart is empty, false otherwise"
            },
            "compose": [
                {
                    "element": "emptyChart",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "name": "clickNewChartFromNoChart",
            "description": {
                "text": [
                    "Clicks the new chart button when no chart is available"
                ]
            },
            "compose": [
                {
                    "element": "newChartButtonNoChart",
                    "apply": "click"
                }
            ]
        },
        {
            "name": "getChartType",
            "description": {
                "text": [
                    "Gets the current chart type by examining the chart wrapper classes"
                ],
                "return": "the chart type (hbar, vbar, pie, or unknown)"
            },
            "compose": [
                {
                    "apply": "waitFor",
                    "args": [
                        {
                            "type": "function",
                            "predicate": [
                                {
                                    "element": "eclairChartWrapper",
                                    "apply": "getAttribute",
                                    "args": [
                                        {
                                            "value": "class"
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "name": "isNoChartVisible",
            "description": {
                "text": [
                    "Checks if the no-chart error state is visible"
                ],
                "return": "true if .noChart is visible"
            },
            "compose": [
                {
                    "element": "noChart",
                    "apply": "isVisible",
                    "returnType": "boolean"
                }
            ]
        }
    ]
}