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

const eventListWidgetControls = defineWidgetControls({
    name: 'event-list-widget',
    supports: ['timeRange', 'liveRefresh', 'displayMode', 'refreshInterval', 'refreshOption'],
    settings: {
        dashboard: {
            live: {
                inline: {
                    showAutoRefresh: true,
                    showTimeContext: true,
                    showRefreshInterval: true
                }
            },
            history: {
                inline: {
                    showTimeContext: true
                }
            }
        },
        config: {
            live: {
                inline: {
                    showAutoRefresh: true,
                    showTimeContext: false,
                    showAggregation: false
                },
                configuration: {
                    showTimeContext: true,
                    showAutoRefresh: true,
                    showAggregation: false
                }
            },
            history: {
                inline: {
                    showRefresh: true,
                    showTimeContext: false,
                    showAggregation: false
                },
                configuration: {
                    showAutoRefresh: false,
                    showRefreshInterval: false,
                    showTimeContext: true,
                    showAggregation: false
                }
            }
        },
        viewAndConfig: {
            live: {
                inline: {
                    showAutoRefresh: true,
                    showRefreshInterval: true,
                    showTimeContext: true,
                    showAggregation: false
                },
                configuration: {
                    showAutoRefresh: true,
                    showRefreshInterval: true,
                    showTimeContext: true,
                    showAggregation: false
                }
            },
            history: {
                inline: {
                    showTimeContext: true,
                    showAggregation: false
                },
                configuration: {
                    showTimeContext: true,
                    showAggregation: false
                }
            }
        },
        defaultLinks: {
            config: {},
            dashboard: {
                live: {
                    dateTimeContext: true,
                    isAutoRefreshEnabled: true
                },
                history: {
                    dateTimeContext: true
                }
            },
            viewAndConfig: {}
        }
    }
});

const eventListWidgetProviders = [
    hookWidgetConfig({
        widgetId: defaultWidgetIds.EVENT_LIST,
        priority: 10,
        label: gettext('Time context'),
        initialState: {
            widgetControls: eventListWidgetControls
        },
        loadComponent: () => import('@c8y/ngx-components/context-dashboard').then(m => m.GlobalContextSectionComponent)
    })
];

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

export { eventListWidgetProviders };
//# sourceMappingURL=c8y-ngx-components-widgets-definitions-event-list.mjs.map
