// api/rapids/wids/operations/getInfrastructureAttacks.descriptions.ts
import { INodeProperties } from 'n8n-workflow';
import { commonRapidsParams } from '../../shared/rapids.commonParams';

/**
 * UI parameters for the getInfrastructureAttacks operation
 */
export const getInfrastructureAttacksDescription: INodeProperties[] = [
	...commonRapidsParams.map((param) => ({
		...param,
		displayOptions: {
			...param.displayOptions,
			show: {
				...param.displayOptions?.show,
				resource: ['wids'],
				operation: ['getInfrastructureAttacks'],
			},
		},
	})),
	{
		displayName: 'Additional Fields',
		name: 'additionalFields',
		type: 'collection',
		placeholder: 'Add Field',
		displayOptions: {
			show: {
				domain: ['rapids'],
				resource: ['wids'],
				operation: ['getInfrastructureAttacks'],
			},
		},
		default: {},
		options: [
			{
				displayName: 'Calculate Total',
				name: 'calculate_total',
				type: 'boolean',
				default: false,
				description: 'Whether to calculate total infrastructure attacks',
			},
			{
				displayName: 'Sort',
				name: 'sort',
				type: 'options',
				options: [
					{
						name: 'Timestamp (Ascending)',
						value: '+ts',
					},
					{
						name: 'Timestamp (Descending)',
						value: '-ts',
					},
					{
						name: 'MAC Address (Ascending)',
						value: '+macaddr',
					},
					{
						name: 'MAC Address (Descending)',
						value: '-macaddr',
					},
				],
				default: '-ts',
				description: 'Sort order for results',
			},
		],
	},
];
