// api/rapids/wids/wids.descriptions.ts (updated)
import { INodeProperties } from 'n8n-workflow';
import { addDescriptions } from '../../../helpers/deduplicate';
import { getInfrastructureAttacksDescription } from './operations/getInfrastructureAttacks.descriptions';
import { getClientAttacksDescription } from './operations/getClientAttacks.descriptions';
import { getWidsEventsDescription } from './operations/getWidsEvents.descriptions';

/**
 * Operation selector for the wids resource
 */
export const widsOperationSelector: INodeProperties = {
	displayName: 'Operation',
	name: 'operation',
	type: 'options',
	noDataExpression: true,
	displayOptions: {
		show: {
			resource: ['wids'],
			domain: ['rapids'],
		},
	},
	options: [
		{
			name: 'List Infrastructure Attacks',
			value: 'getInfrastructureAttacks',
			description: 'Get infrastructure attacks over a time period',
			action: 'List Infrastructure Attacks',
		},
		{
			name: 'List Client Attacks',
			value: 'getClientAttacks',
			description: 'Get client attacks over a time period',
			action: 'List Client Attacks',
		},
		{
			name: 'WIDS Events',
			value: 'getWidsEvents',
			description: 'Get WIDS events over a time period',
			action: 'Get WIDS Events',
		},
	],
	default: 'getInfrastructureAttacks',
};

// Combined descriptions for all operations in this resource
export const widsDescriptions: INodeProperties[] = [widsOperationSelector];

// Add each operation's descriptions
addDescriptions(widsDescriptions, getInfrastructureAttacksDescription);
addDescriptions(widsDescriptions, getClientAttacksDescription);
addDescriptions(widsDescriptions, getWidsEventsDescription);
