import { INodeProperties } from 'n8n-workflow';

/**
 * Parameters for getBssids operation
 */
export const getBssidsDescription: INodeProperties[] = [
	{
		displayName: 'Return All',
		name: 'returnAll',
		type: 'boolean',
		default: false,
		description: 'Whether to return all results or only up to a given limit',
		displayOptions: {
			show: {
				operation: ['getBssids'],
				resource: ['ap'],
				domain: ['monitoring'],
			},
		},
	},
	{
		displayName: 'Limit',
		name: 'limit',
		type: 'number',
		default: 50,
		description: 'Max number of results to return',
		typeOptions: {
			minValue: 1,
		},
		displayOptions: {
			show: {
				operation: ['getBssids'],
				resource: ['ap'],
				domain: ['monitoring'],
				returnAll: [false],
			},
		},
	},

	{
		displayName: 'Additional Fields',
		name: 'additionalFields',
		type: 'collection',
		placeholder: 'Add Field',
		default: {},
		displayOptions: {
			show: {
				resource: ['ap'],
				domain: ['monitoring'],
				operation: ['getBssids'],
			},
		},
		options: [
			{
				displayName: 'Serial',
				name: 'serial',
				type: 'string',
				default: '',
				description: 'Filter by AP serial number',
			},
			{
				displayName: 'Macaddr',
				name: 'macaddr',
				type: 'string',
				default: '',
				description: 'Filter by AP MAC address',
			},
			{
				displayName: 'Cluster_id',
				name: 'cluster_id',
				type: 'string',
				default: '',
				description: 'Filter by Mobility Controller serial number',
			},
			{
				displayName: 'Calculate_total',
				name: 'calculate_total',
				type: 'boolean',
				default: false,
				description: 'Whether to calculate total APs',
			},
			{
				displayName: 'Sort',
				name: 'sort',
				type: 'string',
				default: '',
				description:
					"Sort parameter may be one of +serial, -serial, +macaddr,-macaddr, +swarm_id, -swarm_id.Default is '+serial'",
			},
		],
	},
];
