import { INodeProperties } from 'n8n-workflow';
import { addDescriptions } from '../../../helpers/deduplicate';
import { getInsightDetailsNetworkDescription } from './operations/getInsightDetailsNetwork.descriptions';
import { getInsightDetailsSiteDescription } from './operations/getInsightDetailsSite.descriptions';
import { getInsightDetailsApDescription } from './operations/getInsightDetailsAp.descriptions';
import { getInsightDetailsClientDescription } from './operations/getInsightDetailsClient.descriptions';
import { getInsightDetailsGatewayDescription } from './operations/getInsightDetailsGateway.descriptions';
import { getInsightDetailsSwitchDescription } from './operations/getInsightDetailsSwitch.descriptions';

/**
 * Operation selector for the insightDetails resource
 */
export const insightDetailsOperationSelector: INodeProperties = {
	displayName: 'Operation',
	name: 'operation',
	type: 'options',
	noDataExpression: true,
	displayOptions: {
		show: {
			resource: ['insightDetails'],
			domain: ['aiops'],
		},
	},
	options: [
		{
			name: 'AI Insight Details for a Network',
			value: 'getInsightDetailsNetwork',
			description: 'Get details of single insight for a network',
			action: 'Get AI insight details for a network',
		},
		{
			name: 'AI Insight Details for a Site',
			value: 'getInsightDetailsSite',
			description: 'Get details of single insight for a site',
			action: 'Get AI insight details for a site',
		},
		{
			name: 'AI Insight Details for an AP',
			value: 'getInsightDetailsAp',
			description: 'Get details of single insight for an access point',
			action: 'Get AI insight details for an AP',
		},
		{
			name: 'AI Insight Details for a Client',
			value: 'getInsightDetailsClient',
			description: 'Get details of single insight for a client',
			action: 'Get AI insight details for a client',
		},
		{
			name: 'AI Insight Details for a Gateway',
			value: 'getInsightDetailsGateway',
			description: 'Get details of single insight for a gateway',
			action: 'Get AI insight details for a gateway',
		},
		{
			name: 'AI Insight Details for a Switch',
			value: 'getInsightDetailsSwitch',
			description: 'Get details of single insight for a switch',
			action: 'Get AI insight details for a switch',
		},
	],
	default: 'getInsightDetailsNetwork',
};

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

// Add each operation's descriptions
addDescriptions(insightDetailsDescriptions, getInsightDetailsNetworkDescription);
addDescriptions(insightDetailsDescriptions, getInsightDetailsSiteDescription);
addDescriptions(insightDetailsDescriptions, getInsightDetailsApDescription);
addDescriptions(insightDetailsDescriptions, getInsightDetailsClientDescription);
addDescriptions(insightDetailsDescriptions, getInsightDetailsGatewayDescription);
addDescriptions(insightDetailsDescriptions, getInsightDetailsSwitchDescription);
