/**
 * WordPress dependencies
 */
import { trash, image, Icon, category } from '@wordpress/icons';
import { Button, __experimentalText as Text } from '@wordpress/components';
import { Stack } from '@wordpress/ui';

/**
 * Internal dependencies
 */
import type { Field, Action } from '../../types';

export type SpaceObject = {
	id: number;
	name: {
		title: string;
		description: string;
	};
	image: string;
	type: string;
	isPlanet: boolean;
	categories: string[];
	satellites: number;
	date: string;
	datetime: string;
	email: string;
	author: string;
};

export const data: SpaceObject[] = [
	{
		id: 1,
		name: {
			title: 'Moon',
			description:
				"The Moon is Earth's only natural satellite, orbiting at an average distance of 384,400 kilometers with a synchronous rotation that leads to fixed lunar phases as seen from Earth. Its cratered surface and subtle glow define night skies, inspiring exploration missions and influencing tides and biological rhythms worldwide.",
		},
		image: 'https://live.staticflickr.com/7398/9458193857_e1256123e3_z.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Earth', 'Moon' ],
		satellites: 0,
		date: '2021-01-01',
		datetime: '2021-01-01T14:30:00Z',
		email: 'moon@example.com',
		author: 'lunarian_observer',
	},
	{
		id: 2,
		name: {
			title: 'Io',
			description: 'Moon of Jupiter',
		},
		image: 'https://live.staticflickr.com/5482/9460973502_07e8ab81fe_z.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Jupiter', 'Moon' ],
		satellites: 0,
		date: '2019-01-02',
		datetime: '2019-01-02T09:15:00Z',
		email: 'io@example.com',
		author: 'galilean_moon_enthusiast_supreme',
	},
	{
		id: 3,
		name: {
			title: 'Europa',
			description: 'Moon of Jupiter',
		},
		image: 'https://live.staticflickr.com/65535/31499273012_baf5f38cc1_z.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Jupiter', 'Moon' ],
		satellites: 0,
		date: '2025-01-03',
		datetime: '2025-01-03T16:45:30Z',
		email: 'europa@example.com',
		author: 'icy_ocean_explorer',
	},
	{
		id: 4,
		name: {
			title: 'Ganymede',
			description: 'Largest moon of Jupiter',
		},
		image: 'https://live.staticflickr.com/7816/33436473218_a836235935_k.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Jupiter', 'Moon' ],
		satellites: 0,
		date: '2022-01-04',
		datetime: '2022-01-04T12:30:00Z',
		email: 'ganymede@example.com',
		author: 'jovian_satellite_researcher',
	},
	{
		id: 5,
		name: {
			title: 'Callisto',
			description: 'Outermost Galilean moon of Jupiter',
		},
		image: 'https://live.staticflickr.com/804/27604150528_4512448a9c_c.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Jupiter', 'Moon' ],
		satellites: 0,
		date: '2021-01-05',
		datetime: '2021-01-05T14:15:30Z',
		email: 'callisto@example.com',
		author: 'crater_cartography_specialist',
	},
	{
		id: 6,
		name: {
			title: 'Amalthea',
			description: 'Small irregular moon of Jupiter',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/6/62/Amalthea.gif',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Jupiter', 'Moon' ],
		satellites: 0,
		date: '2020-01-06',
		datetime: '2020-01-06T10:45:15Z',
		email: 'amalthea@example.com',
		author: 'astro_photographer',
	},
	{
		id: 7,
		name: {
			title: 'Himalia',
			description: 'Largest irregular moon of Jupiter',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/c/c2/Cassini-Huygens_Image_of_Himalia.png',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Jupiter', 'Moon' ],
		satellites: 0,
		date: '2019-01-07',
		datetime: '2019-01-07T16:20:45Z',
		email: 'himalia@example.com',
		author: 'irregular_orbit_analyst',
	},
	{
		id: 8,
		name: {
			title: 'Neptune',
			description: 'Ice giant in the Solar system',
		},
		image: 'https://live.staticflickr.com/65535/29523683990_000ff4720c_z.jpg',
		type: 'Ice giant',
		isPlanet: true,
		categories: [ 'Ice giant', 'Planet', 'Solar system' ],
		satellites: 16,
		date: '2020-01-01',
		datetime: '2020-01-01T11:22:15Z',
		email: 'neptune@example.com',
		author: 'neptunian_dynamics_professor',
	},
	{
		id: 9,
		name: {
			title: 'Triton',
			description: 'Largest moon of Neptune',
		},
		image: 'https://live.staticflickr.com/65535/50728384241_02c5126c30_h.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Neptune', 'Moon' ],
		satellites: 0,
		date: '2021-02-01',
		datetime: '2021-02-01T11:30:00Z',
		email: 'triton@example.com',
		author: 'retrograde_orbit_specialist',
	},
	{
		id: 10,
		name: {
			title: 'Nereid',
			description: 'Irregular moon of Neptune',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/b/b0/Nereid-Voyager2.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Neptune', 'Moon' ],
		satellites: 0,
		date: '2020-02-02',
		datetime: '2020-02-02T15:45:30Z',
		email: 'nereid@example.com',
		author: 'outer_solar_system_voyager_mission_director',
	},
	{
		id: 11,
		name: {
			title: 'Proteus',
			description: 'Second-largest moon of Neptune',
		},
		image: 'https://live.staticflickr.com/65535/50727825808_bf427e007b_c.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Neptune', 'Moon' ],
		satellites: 0,
		date: '2019-02-03',
		datetime: '2019-02-03T09:20:15Z',
		email: 'proteus@example.com',
		author: 'space_observer',
	},
	{
		id: 12,
		name: {
			title: 'Mercury',
			description: 'Terrestrial planet in the Solar system',
		},
		image: 'https://live.staticflickr.com/813/40199101735_e5e92ffd11_z.jpg',
		type: 'Terrestrial',
		isPlanet: true,
		categories: [ 'Terrestrial', 'Planet', 'Solar system' ],
		satellites: 0,
		date: '2020-01-02',
		datetime: '2020-01-02T13:05:45Z',
		email: 'mercury@example.com',
		author: 'solar_wind_scientist',
	},
	{
		id: 13,
		name: {
			title: 'Venus',
			description: 'La planète Vénus',
		},
		image: 'https://live.staticflickr.com/8025/7544560662_900e717727_z.jpg',
		type: 'Terrestrial',
		isPlanet: true,
		categories: [ 'Terrestrial', 'Planet', 'Solar system' ],
		satellites: 0,
		date: '2020-01-02',
		datetime: '2020-01-02T08:30:12Z',
		email: 'venus@example.com',
		author: 'atmospheric_chemistry_expert',
	},
	{
		id: 14,
		name: {
			title: 'Earth',
			description: 'Terrestrial planet in the Solar system',
		},
		image: 'https://live.staticflickr.com/3762/9460163562_964fe6af07_z.jpg',
		type: 'Terrestrial',
		isPlanet: true,
		categories: [ 'Terrestrial', 'Planet', 'Solar system', 'Earth' ],
		satellites: 1,
		date: '2023-01-03',
		datetime: '2023-01-03T18:15:30Z',
		email: 'earth@example.com',
		author: 'planetary_geologist',
	},
	{
		id: 15,
		name: {
			title: 'Mars',
			description: 'Terrestrial planet in the Solar system',
		},
		image: 'https://live.staticflickr.com/8151/7651156426_e047f4d219_z.jpg',
		type: 'Terrestrial',
		isPlanet: true,
		categories: [ 'Terrestrial', 'Planet', 'Solar system' ],
		satellites: 2,
		date: '2020-01-01',
		datetime: '2020-01-01T20:45:00Z',
		email: 'mars@example.com',
		author: 'red_planet_explorer',
	},
	{
		id: 16,
		name: {
			title: 'Jupiter',
			description: 'Gas giant in the Solar system',
		},
		image: 'https://staging-jubilee.flickr.com/2853/9458010071_6e6fc41408_z.jpg',
		type: 'Gas giant',
		isPlanet: true,
		categories: [ 'Solar system', 'Planet', 'Gas giant' ],
		satellites: 97,
		date: '2017-01-01',
		datetime: '2017-01-01T00:01:00Z',
		email: 'jupiter@example.com',
		author: 'gas_giant_meteorologist',
	},
	{
		id: 17,
		name: {
			title: 'Saturn',
			description: 'Gas giant in the Solar system',
		},
		image: 'https://live.staticflickr.com/5524/9464658509_fc2d83dff5_z.jpg',
		type: 'Gas giant',
		isPlanet: true,
		categories: [ 'Gas giant', 'Solar system', 'Planet' ],
		satellites: 274,
		date: '2020-02-01',
		datetime: '2020-02-01T00:02:00Z',
		email: 'saturn@example.com',
		author: 'ring_system_analyst',
	},
	{
		id: 18,
		name: {
			title: 'Uranus',
			description: 'Ice giant in the Solar system',
		},
		image: 'https://live.staticflickr.com/65535/5553350875_3072df91e2_c.jpg',
		type: 'Ice giant',
		isPlanet: true,
		categories: [ 'Planet', 'Ice giant', 'Solar system' ],
		satellites: 28,
		date: '2020-03-01',
		datetime: '2020-03-01T10:15:20Z',
		email: 'uranus@example.com',
		author: 'axial_tilt_researcher',
	},
	{
		id: 19,
		name: {
			title: 'Thessalonikopolymnianebuchodonossarinacharybdis',
			description: 'Takes longer to say than to orbit.',
		},
		image: 'https://live.staticflickr.com/1357/935805705_119635028c_b.jpg',
		type: 'Rogue planet',
		isPlanet: true,
		categories: [ 'Planet', 'Rogue planet' ],
		satellites: 0,
		date: '2020-03-01',
		datetime: '2020-03-01T10:15:20Z',
		email: 'thessalonikopolymnianebuchodonossarinacharybdis@example.com',
		author: 'interstellar_nomadic_planetary_body_tracking_specialist',
	},
	{
		id: 20,
		name: {
			title: 'Titan',
			description: 'Largest moon of Saturn',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/f/fe/Titan_in_true_color_by_Kevin_M._Gill.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Saturn', 'Moon' ],
		satellites: 0,
		date: '2022-02-15',
		datetime: '2022-02-15T08:30:00Z',
		email: 'titan@example.com',
		author: 'saturn_system_researcher',
	},
	{
		id: 21,
		name: {
			title: 'Enceladus',
			description: 'Icy moon of Saturn with geysers',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/PIA17202_-_Approaching_Enceladus.jpg/960px-PIA17202_-_Approaching_Enceladus.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Saturn', 'Moon' ],
		satellites: 0,
		date: '2023-03-20',
		datetime: '2023-03-20T11:45:00Z',
		email: 'enceladus@example.com',
		author: 'cryovolcanism_observer',
	},
	{
		id: 22,
		name: {
			title: 'Mimas',
			description: 'Death Star moon of Saturn',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Mimas_Cassini.jpg/960px-Mimas_Cassini.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Saturn', 'Moon' ],
		satellites: 0,
		date: '2021-07-12',
		datetime: '2021-07-12T15:20:00Z',
		email: 'mimas@example.com',
		author: 'impact_crater_analyst',
	},
	{
		id: 23,
		name: {
			title: 'Charon',
			description: 'Largest moon of Pluto',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/2/2e/Charon_in_True_Color_-_High-Res.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Pluto', 'Moon' ],
		satellites: 0,
		date: '2020-09-25',
		datetime: '2020-09-25T13:15:00Z',
		email: 'charon@example.com',
		author: 'pluto_system_mapper',
	},
	{
		id: 24,
		name: {
			title: 'Phobos',
			description: 'Larger moon of Mars',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Phobos_colour_2008.jpg/960px-Phobos_colour_2008.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Mars', 'Moon' ],
		satellites: 0,
		date: '2019-06-14',
		datetime: '2019-06-14T07:45:00Z',
		email: 'phobos@example.com',
		author: 'martian_surface_cartographer',
	},
	{
		id: 25,
		name: {
			title: 'Deimos',
			description: 'Smaller moon of Mars',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/8/86/NASA-Deimos-MarsMoon-20090221.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Mars', 'Moon' ],
		satellites: 0,
		date: '2018-11-30',
		datetime: '2018-11-30T16:00:00Z',
		email: 'deimos@example.com',
		author: 'small_moon_surveyor',
	},
	{
		id: 26,
		name: {
			title: 'Rhea',
			description: 'Second largest moon of Saturn',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/PIA07763_Rhea_full_globe5.jpg/2560px-PIA07763_Rhea_full_globe5.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Saturn', 'Moon' ],
		satellites: 0,
		date: '2022-08-19',
		datetime: '2022-08-19T10:30:00Z',
		email: 'rhea@example.com',
		author: 'saturn_geology_specialist',
	},
	{
		id: 27,
		name: {
			title: 'Iapetus',
			description: 'Two-toned moon of Saturn',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Iapetus_trailing_natural_color.jpg/2560px-Iapetus_trailing_natural_color.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Saturn', 'Moon' ],
		satellites: 0,
		date: '2023-01-22',
		datetime: '2023-01-22T14:20:00Z',
		email: 'iapetus@example.com',
		author: 'two_tone_surface_expert',
	},
	{
		id: 28,
		name: {
			title: 'Dione',
			description: 'Icy moon of Saturn',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/d/d0/Dione_in_natural_light_%28cropped%29.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Saturn', 'Moon' ],
		satellites: 0,
		date: '2021-04-17',
		datetime: '2021-04-17T12:00:00Z',
		email: 'dione@example.com',
		author: 'icy_surface_geochemist',
	},
	{
		id: 29,
		name: {
			title: 'Tethys',
			description: 'Mid-sized moon of Saturn',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/Tethys_-_Rev_15_%2837267740632%29.png/960px-Tethys_-_Rev_15_%2837267740632%29.png',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Saturn', 'Moon' ],
		satellites: 0,
		date: '2020-12-05',
		datetime: '2020-12-05T09:40:00Z',
		email: 'tethys@example.com',
		author: 'middle_satellite_researcher',
	},
	{
		id: 30,
		name: {
			title: 'Miranda',
			description: 'Unusual moon of Uranus',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/Miranda_mosaic_in_color_-_Voyager_2.png/960px-Miranda_mosaic_in_color_-_Voyager_2.png',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Uranus', 'Moon' ],
		satellites: 0,
		date: '2024-02-28',
		datetime: '2024-02-28T11:15:00Z',
		email: 'miranda@example.com',
		author: 'uranian_moon_geologist',
	},
	{
		id: 31,
		name: {
			title: 'Ariel',
			description: 'Brightest moon of Uranus',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Ariel_in_monochrome.jpg/960px-Ariel_in_monochrome.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Uranus', 'Moon' ],
		satellites: 0,
		date: '2023-09-10',
		datetime: '2023-09-10T08:25:00Z',
		email: 'ariel@example.com',
		author: 'planetary_reflectance_specialist',
	},
	{
		id: 32,
		name: {
			title: 'Umbriel',
			description: 'Dark moon of Uranus',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/PIA00040_Umbrielx2.47.jpg/560px-PIA00040_Umbrielx2.47.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Uranus', 'Moon' ],
		satellites: 0,
		date: '2022-05-03',
		datetime: '2022-05-03T15:50:00Z',
		email: 'umbriel@example.com',
		author: 'dark_surface_researcher',
	},
	{
		id: 33,
		name: {
			title: 'Titania',
			description: 'Largest moon of Uranus',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Titania_-_Jan_24_1986_%2822689891350%29.jpg/560px-Titania_-_Jan_24_1986_%2822689891350%29.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Uranus', 'Moon' ],
		satellites: 0,
		date: '2021-10-18',
		datetime: '2021-10-18T13:35:00Z',
		email: 'titania@example.com',
		author: 'uranian_system_surveyor',
	},
	{
		id: 34,
		name: {
			title: 'Oberon',
			description: 'Outermost major moon of Uranus',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/6/6d/Oberon_in_true_color_by_Kevin_M._Gill.jpg',
		type: 'Satellite',
		isPlanet: false,
		categories: [ 'Solar system', 'Satellite', 'Uranus', 'Moon' ],
		satellites: 0,
		date: '2020-07-22',
		datetime: '2020-07-22T10:05:00Z',
		email: 'oberon@example.com',
		author: 'outer_uranian_orbitalist',
	},
	{
		id: 35,
		name: {
			title: 'Ceres',
			description: 'Largest object in the asteroid belt',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/7/76/Ceres_-_RC3_-_Haulani_Crater_%2822381131691%29_%28cropped%29.jpg/560px-Ceres_-_RC3_-_Haulani_Crater_%2822381131691%29_%28cropped%29.jpg',
		type: 'Dwarf planet',
		isPlanet: false,
		categories: [ 'Solar system', 'Dwarf planet', 'Asteroid belt' ],
		satellites: 0,
		date: '2024-08-14',
		datetime: '2024-08-14T16:40:00Z',
		email: 'ceres@example.com',
		author: 'asteroid_belt_specialist',
	},
	{
		id: 36,
		name: {
			title: 'Makemake',
			description: 'Reddish dwarf planet',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Makemake_and_its_moon.jpg/560px-Makemake_and_its_moon.jpg',
		type: 'Dwarf planet',
		isPlanet: false,
		categories: [ 'Solar system', 'Dwarf planet', 'Trans-Neptunian' ],
		satellites: 1,
		date: '2022-03-29',
		datetime: '2022-03-29T12:55:00Z',
		email: 'makemake@example.com',
		author: 'trans_neptunian_researcher',
	},
	{
		id: 37,
		name: {
			title: 'Haumea',
			description: 'Elongated dwarf planet',
		},
		image: 'https://upload.wikimedia.org/wikipedia/commons/2/2b/Haumea_Hubble.png',
		type: 'Dwarf planet',
		isPlanet: false,
		categories: [ 'Solar system', 'Dwarf planet', 'Trans-Neptunian' ],
		satellites: 2,
		date: '2021-11-11',
		datetime: '2021-11-11T09:10:00Z',
		email: 'haumea@example.com',
		author: 'dwarf_planet_dynamics_specialist',
	},
];

export const actions: Action< SpaceObject >[] = [
	{
		id: 'delete',
		label: 'Delete item',
		isPrimary: true,
		icon: trash,
		modalHeader: ( items ) =>
			items.length > 1
				? `Delete ${ items.length } items`
				: `Delete ${ items[ 0 ].name.title }`,
		modalFocusOnMount: 'firstContentElement',
		supportsBulk: true,
		RenderModal: ( { items, closeModal } ) => {
			const label =
				items.length > 1
					? `Are you sure you want to delete ${ items.length } items?`
					: `Are you sure you want to delete "${ items[ 0 ].name.title }"?`;
			return (
				<Stack direction="column" gap="xl">
					<Text>{ label }</Text>
					<Stack direction="row" gap="sm" justify="right">
						<Button
							__next40pxDefaultSize
							variant="tertiary"
							onClick={ closeModal }
						>
							Cancel
						</Button>
						<Button
							__next40pxDefaultSize
							variant="primary"
							onClick={ closeModal }
						>
							Delete
						</Button>
					</Stack>
				</Stack>
			);
		},
	},
	{
		id: 'secondary',
		label: 'Secondary action',
		callback() {
			// eslint-disable-next-line no-console
			console.log( 'Perform secondary action.' );
		},
	},
];

export const fields: Field< SpaceObject >[] = [
	{
		label: 'Image',
		id: 'image',
		type: 'media',
		header: (
			<Stack direction="row" gap="xs" justify="start" align="center">
				<Icon icon={ image } />
				<span style={ { minWidth: 0 } }>Image</span>
			</Stack>
		),
		render: ( { item } ) => {
			return <img src={ item.image } alt="" />;
		},
	},
	{
		label: 'Title',
		id: 'title',
		type: 'text',
		enableHiding: true,
		enableGlobalSearch: true,
		filterBy: {
			operators: [ 'contains', 'notContains', 'startsWith' ],
		},
		isValid: {
			required: true,
		},
		getValue: ( { item } ) => item.name.title,
		setValue: ( { value } ) => ( {
			name: {
				title: value,
			},
		} ),
	},
	{
		id: 'date',
		label: 'Date',
		type: 'date',
	},
	{
		id: 'datetime',
		label: 'Datetime',
		type: 'datetime',
	},
	{
		label: 'Type',
		id: 'type',
		enableHiding: false,
		elements: [
			{ value: 'Satellite', label: 'Satellite' },
			{ value: 'Ice giant', label: 'Ice giant' },
			{ value: 'Terrestrial', label: 'Terrestrial' },
			{ value: 'Gas giant', label: 'Gas giant' },
			{ value: 'Dwarf planet', label: 'Dwarf planet' },
			{ value: 'Asteroid', label: 'Asteroid' },
			{ value: 'Comet', label: 'Comet' },
			{ value: 'Kuiper belt object', label: 'Kuiper belt object' },
			{ value: 'Protoplanet', label: 'Protoplanet' },
			{ value: 'Planetesimal', label: 'Planetesimal' },
			{ value: 'Minor planet', label: 'Minor planet' },
			{
				value: 'Trans-Neptunian object',
				label: 'Trans-Neptunian object',
			},
			{
				value: 'Extreme Trans-Neptunian Scattered Disc Object',
				label: 'Extreme Trans-Neptunian Scattered Disc Object',
			},
		],
		filterBy: {
			operators: [ 'is', 'isNot' ],
		},
	},
	{
		id: 'isPlanet',
		label: 'Is Planet',
		type: 'boolean',
		setValue: ( { value } ) => ( {
			isPlanet: value === 'true',
		} ),
		elements: [
			{ value: true, label: 'True' },
			{ value: false, label: 'False' },
		],
	},
	{
		label: 'Satellites',
		id: 'satellites',
		type: 'integer',
		enableSorting: true,
	},
	{
		label: 'Description',
		id: 'description',
		type: 'text',
		enableSorting: false,
		enableGlobalSearch: true,
		filterBy: {
			operators: [ 'contains', 'notContains', 'startsWith' ],
		},
		getValue: ( { item } ) => item.name.description,
		setValue: ( { value } ) => ( {
			name: {
				description: value,
			},
		} ),
	},
	{
		label: 'Email',
		id: 'email',
		type: 'email',
	},
	{
		label: 'Categories',
		id: 'categories',
		header: (
			<Stack direction="row" gap="xs" justify="start" align="center">
				<Icon icon={ category } />
				<span style={ { minWidth: 0 } }>Categories</span>
			</Stack>
		),
		elements: [
			{ value: 'Solar system', label: 'Solar system' },
			{ value: 'Satellite', label: 'Satellite' },
			{ value: 'Moon', label: 'Moon' },
			{ value: 'Earth', label: 'Earth' },
			{ value: 'Jupiter', label: 'Jupiter' },
			{ value: 'Planet', label: 'Planet' },
			{ value: 'Ice giant', label: 'Ice giant' },
			{ value: 'Terrestrial', label: 'Terrestrial' },
			{ value: 'Gas giant', label: 'Gas giant' },
			{
				value: 'Extreme Outer Solar System Trans-Neptunian Region',
				label: 'Extreme Outer Solar System Trans-Neptunian Region',
			},
		],
		type: 'array',
		enableGlobalSearch: true,
	},
	{
		label: 'Author',
		id: 'author',
		type: 'text',
		enableHiding: false,
		enableGlobalSearch: true,
		elements: [
			{ value: 'lunarian_observer', label: 'lunarian_observer' },
			{
				value: 'galilean_moon_enthusiast_supreme',
				label: 'galilean_moon_enthusiast_supreme',
			},
			{ value: 'icy_ocean_explorer', label: 'icy_ocean_explorer' },
			{
				value: 'jovian_satellite_researcher',
				label: 'jovian_satellite_researcher',
			},
			{
				value: 'crater_cartography_specialist',
				label: 'crater_cartography_specialist',
			},
			{ value: 'astro_photographer', label: 'astro_photographer' },
			{
				value: 'irregular_orbit_analyst',
				label: 'irregular_orbit_analyst',
			},
			{
				value: 'neptunian_dynamics_professor',
				label: 'neptunian_dynamics_professor',
			},
			{
				value: 'retrograde_orbit_specialist',
				label: 'retrograde_orbit_specialist',
			},
			{
				value: 'outer_solar_system_voyager_mission_director',
				label: 'outer_solar_system_voyager_mission_director',
			},
			{ value: 'space_observer', label: 'space_observer' },
			{ value: 'solar_wind_scientist', label: 'solar_wind_scientist' },
			{
				value: 'atmospheric_chemistry_expert',
				label: 'atmospheric_chemistry_expert',
			},
			{ value: 'planetary_geologist', label: 'planetary_geologist' },
			{ value: 'red_planet_explorer', label: 'red_planet_explorer' },
			{
				value: 'gas_giant_meteorologist',
				label: 'gas_giant_meteorologist',
			},
			{ value: 'ring_system_analyst', label: 'ring_system_analyst' },
			{ value: 'axial_tilt_researcher', label: 'axial_tilt_researcher' },
			{
				value: 'interstellar_nomadic_planetary_body_tracking_specialist',
				label: 'interstellar_nomadic_planetary_body_tracking_specialist',
			},
		],
		filterBy: {
			operators: [ 'isAny', 'isNone' ],
		},
	},
];
