module.exports = function (self) {
	self.setFeedbackDefinitions({
		button_down: {
			type: 'boolean',
			name: 'Button Down',
			description: 'Becomes TRUE when a specific GO BOX 2 button is pressed',
			options: [
				{
					type: 'number',
					label: 'Button ID (1–6)',
					id: 'buttonId',
					min: 1,
					max: 6,
				},
			],
			callback: (feedback) => {
				const id = feedback.options.buttonId
				return self.buttonStates[id] === true
			},
		},

		button_up: {
			type: 'boolean',
			name: 'Button Up',
			description: 'Becomes TRUE when a specific GO BOX 2 button is released',
			options: [
				{
					type: 'number',
					label: 'Button ID (1–6)',
					id: 'buttonId',
					min: 1,
					max: 6,
				},
			],
			callback: (feedback) => {
				const id = feedback.options.buttonId
				return self.buttonStates[id] === false
			},
		},
	})
}
