import { INodeProperties } from 'n8n-workflow';

/**
 * Parameters for getSwitchPortsErrors operation
 */
export const getSwitchPortsErrorsDescription: INodeProperties[] = [
	{
		displayName: 'Serial',
		name: 'serial',
		type: 'string',
		required: true,
		default: '',
		description: 'Serial number of the switch to get port errors for',
		displayOptions: {
			show: {
				operation: ['getSwitchPortsErrors'],
				resource: ['switch'],
				domain: ['monitoring'],
			},
		},
	},
	{
		displayName: 'From',
		name: 'from_timestamp',
		type: 'dateTime',
		default: '',
		description: 'Start time for data retrieval (defaults to current time minus 3 hours)',
		displayOptions: {
			show: {
				operation: ['getSwitchPortsErrors'],
				resource: ['switch'],
				domain: ['monitoring'],
			},
		},
	},
	{
		displayName: 'To',
		name: 'to_timestamp',
		type: 'dateTime',
		default: '',
		description: 'End time for data retrieval (defaults to current time)',
		displayOptions: {
			show: {
				operation: ['getSwitchPortsErrors'],
				resource: ['switch'],
				domain: ['monitoring'],
			},
		},
	},
	{
		displayName: 'Additional Fields',
		name: 'additionalFields',
		type: 'collection',
		placeholder: 'Add Field',
		default: {},
		displayOptions: {
			show: {
				operation: ['getSwitchPortsErrors'],
				resource: ['switch'],
				domain: ['monitoring'],
			},
		},
		options: [
			{
				displayName: 'Port',
				name: 'port',
				type: 'string',
				default: '',
				description: 'Filter by port',
			},
			{
				displayName: 'Error',
				name: 'error',
				type: 'options',
				options: [
					{ name: 'In', value: 'in' },
					{ name: 'Out', value: 'out' },
				],
				default: '',
				description: 'Filter by in or out error',
			},
		],
	},
];
