import { __ } from '@wordpress/i18n';

type ToggleKey =
	| 'check_posts'
	| 'check_pages'
	| 'check_media'
	| 'editor_warning'
	| 'email_enabled';

export type SettingToggle = {
	key: ToggleKey;
	label: string;
	text: string;
	hasPreview: boolean;
};

export function settingToggles(): SettingToggle[] {
	return [
		{
			key: 'check_posts',
			label: __( 'Posts', 'aiplaz-link-checkup' ),
			text: __(
				'Check the links inside your posts.',
				'aiplaz-link-checkup'
			),
			hasPreview: false,
		},
		{
			key: 'check_pages',
			label: __( 'Pages', 'aiplaz-link-checkup' ),
			text: __(
				'Check the links inside your pages.',
				'aiplaz-link-checkup'
			),
			hasPreview: false,
		},
		{
			key: 'check_media',
			label: __( 'Images and videos', 'aiplaz-link-checkup' ),
			text: __(
				'Also check that pictures and embedded videos still load.',
				'aiplaz-link-checkup'
			),
			hasPreview: false,
		},
		{
			key: 'editor_warning',
			label: __( 'Warn me while I write', 'aiplaz-link-checkup' ),
			text: __(
				'Flags a broken link in the editor before you publish.',
				'aiplaz-link-checkup'
			),
			hasPreview: true,
		},
		{
			key: 'email_enabled',
			label: __( 'Email me when a link breaks', 'aiplaz-link-checkup' ),
			text: __(
				'One short email a week, only if something is wrong.',
				'aiplaz-link-checkup'
			),
			hasPreview: false,
		},
	];
}
