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 (max 1000)',
		typeOptions: {
			minValue: 1,
			maxValue: 1000,
		},
		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: 'Offset',
				name: 'offset',
				type: 'number',
				default: 0,
				description: 'Pagination offset - number of items to skip',
				typeOptions: {
					minValue: 0,
				},
			},
			{
				displayName: 'Group',
				name: 'group',
				type: 'string',
				default: '',
				description: 'Filter by group name. Note: Only ONE of group, swarm_id, label, serial, macaddr, or site can be specified.',
			},
			{
				displayName: 'Swarm ID',
				name: 'swarm_id',
				type: 'string',
				default: '',
				description: 'Filter by Swarm ID. Note: Only ONE of group, swarm_id, label, serial, macaddr, or site can be specified.',
			},
			{
				displayName: 'Label',
				name: 'label',
				type: 'string',
				default: '',
				description: 'Filter by Label name. Note: Only ONE of group, swarm_id, label, serial, macaddr, or site can be specified.',
			},
			{
				displayName: 'Site',
				name: 'site',
				type: 'string',
				default: '',
				description: 'Filter by Site name. Note: Only ONE of group, swarm_id, label, serial, macaddr, or site can be specified.',
			},
			{
				displayName: 'Serial',
				name: 'serial',
				type: 'string',
				default: '',
				description: 'Filter by AP serial number. Note: Only ONE of group, swarm_id, label, serial, macaddr, or site can be specified.',
			},
			{
				displayName: 'Macaddr',
				name: 'macaddr',
				type: 'string',
				default: '',
				description: 'Filter by AP MAC address. Note: Only ONE of group, swarm_id, label, serial, macaddr, or site can be specified.',
			},
			{
				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 BSSIDs',
			},
			{
				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'",
			},
		],
	},
];
