import { hookWidgetConfig, WidgetAssetSelectorComponent } from '@c8y/ngx-components/context-dashboard';
import { gettext } from '@c8y/ngx-components/gettext';
import { DynamicComponentErrorStrategy, DynamicManagedObjectResolver, hookWidget } from '@c8y/ngx-components';
import { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';
import { importConfigWithDevice, exportConfigWithDevice } from '@c8y/ngx-components/widgets/import-export-config';

const deviceControlMessageWidgetDefinition = {
    id: defaultWidgetIds.DEVICE_CONTROL_MESSAGE_WIDGET,
    label: gettext('Message sending'),
    description: gettext(`Remotely send a message to a device`),
    loadComponent: () => import('@c8y/ngx-components/widgets/implementations/device-control-message').then(m => m.DeviceControlMessageWidgetViewComponent),
    resolve: {
        device: DynamicManagedObjectResolver
    },
    previewImage: 'c8y-style-assets/device-control-message-widget.png',
    errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,
    data: {
        schema: () => import('c8y-schema-loader?interfaceName=DeviceControlMessageWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/device-control-message'),
        export: exportConfigWithDevice,
        import: importConfigWithDevice,
        settings: {
            noNewWidgets: false,
            widgetDefaults: {
                _width: 8,
                _height: 4
            }
        }
    }
};
const deviceControlMessageWidgetProviders = [
    hookWidget(deviceControlMessageWidgetDefinition),
    hookWidgetConfig({
        widgetId: defaultWidgetIds.DEVICE_CONTROL_MESSAGE_WIDGET,
        label: gettext('Device'),
        loadComponent: () => Promise.resolve(WidgetAssetSelectorComponent),
        priority: 100
    })
];

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

export { deviceControlMessageWidgetDefinition, deviceControlMessageWidgetProviders };
//# sourceMappingURL=c8y-ngx-components-widgets-definitions-device-control-message.mjs.map
