import path from 'path';

import type { ComponentStructuredContentSource } from '@atlassian/structured-docs-types';

const documentation: ComponentStructuredContentSource[] = [
	{
		name: 'Radio',
		description:
			'A radio button component for single selection from a set of mutually exclusive choices. Use for custom radio button presentations like options in tables or when you need fine control over individual radio buttons.',
		status: 'general-availability',
		import: {
			name: 'Radio',
			package: '@atlaskit/radio',
			type: 'named',
			packagePath: path.resolve(__dirname),
			packageJson: require('./package.json'),
		},
		usageGuidelines: [
			'Use for custom radio button presentations (e.g., options in tables)',
			'Use when you need fine control over individual radio buttons',
			'List options in logical order (most likely to least likely)',
			'Make one option the default (safest, most secure option)',
			"Add 'None' option if unselected state is needed",
			"Add 'Other' option if not all options can be listed",
		],
		contentGuidelines: [
			'Use clear, descriptive labels that provide context',
			'Keep labels concise but informative',
			'Use sentence case for labels',
			'Avoid overlapping or skipping numeric choices',
		],
		accessibilityGuidelines: [
			'Include error messages for required or invalid radio fields',
			'Never preselect high-risk options for payment, privacy, or security',
			"Don't use disabled radio buttons if they need to remain in tab order",
			'Use validation instead of disabled state for better accessibility',
		],
		examples: [
			{
				name: 'Radio',
				description: 'Radio example',
				source: path.resolve(__dirname, './examples/ai/radio.tsx'),
			},
		],
		keywords: ['radio', 'button', 'input', 'form', 'selection', 'choice', 'option'],
		categories: ['form', 'interaction'],
	},
	{
		name: 'RadioGroup',
		description:
			'A radio group component that presents a list of options where only one choice can be selected. Use for most radio button scenarios where you want a simple list of mutually exclusive options.',
		status: 'general-availability',
		import: {
			name: 'RadioGroup',
			package: '@atlaskit/radio',
			type: 'named',
			packagePath: path.resolve(__dirname),
			packageJson: require('./package.json'),
		},
		usageGuidelines: [
			'Use for most radio button scenarios with simple option lists',
			'List options in logical order (most likely to least likely)',
			'Make one option the default (safest, most secure option)',
			"Add 'None' option if unselected state is needed",
			"Add 'Other' option if not all options can be listed",
			'Use select component for longer lists of options',
		],
		contentGuidelines: [
			'Use clear, descriptive labels that provide context',
			'Keep labels concise but informative',
			'Use sentence case for labels',
			'Avoid overlapping or skipping numeric choices',
		],
		accessibilityGuidelines: [
			'Include error messages for required or invalid radio fields',
			'Never preselect high-risk options for payment, privacy, or security',
			"Don't use disabled radio buttons if they need to remain in tab order",
			'Use validation instead of disabled state for better accessibility',
			'Ensure proper keyboard navigation with arrow keys',
		],
		examples: [
			{
				name: 'Radio Group',
				description: 'Radio Group example',
				source: path.resolve(__dirname, './examples/ai/radio-group.tsx'),
			},
		],
		keywords: ['radio', 'group', 'form', 'selection', 'choice', 'options', 'list'],
		categories: ['form', 'interaction'],
	},
];

export default documentation;
