import { gettext } from '@c8y/ngx-components/gettext';
import { hookWidget } from '@c8y/ngx-components';
import { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';
import { hookWidgetConfig } from '@c8y/ngx-components/context-dashboard';

const pieChartWidgetDefinition = {
    id: defaultWidgetIds.PIE_CHART,
    label: gettext('Pie chart'),
    description: gettext(`Displays data in a pie chart format.`),
    previewImage: 'c8y-style-assets/pie-chart-widget-pr.png',
    loadComponent: () => import('@c8y/ngx-components/widgets/implementations/pie-chart').then(m => m.PieChartWidgetViewComponent),
    loadConfigComponent: () => import('@c8y/ngx-components/widgets/implementations/pie-chart').then(m => m.PieChartWidgetConfigComponent),
    data: {
        settings: {
            noNewWidgets: false,
            widgetDefaults: {
                _width: 6,
                _height: 6
            },
            noDeviceTarget: true
        }
    }
};
const pieChartWidgetProviders = [
    hookWidget(pieChartWidgetDefinition),
    hookWidgetConfig({
        widgetId: defaultWidgetIds.PIE_CHART,
        label: gettext('Data point selection'),
        loadComponent: () => import('@c8y/ngx-components/datapoint-selector').then(m => m.WidgetDatapointsSelectorComponent),
        initialState: {
            minActiveCount: 1,
            showDifferentUnitsAlert: true
        },
        expanded: true,
        priority: 80
    })
];

/**
 * Generated bundle index. Do not edit.
 */

export { pieChartWidgetDefinition, pieChartWidgetProviders };
//# sourceMappingURL=c8y-ngx-components-widgets-definitions-pie-chart.mjs.map
