import React from 'react';
import {List, Button, Label} from 'semantic-ui-react';

const SelectedItem = ({i18n, data, idx, removeSelect}) => {

	return (
		<List.Item>
			<List.Content floated="right">
				<Button type="button" size="mini" content={i18n&&i18n.t ? i18n.t('page.iogroup.form.button.remove') : ''} onClick={() => {removeSelect(idx)}} />
			</List.Content>
			<Label content={data.type || ''} />
			{data.name || ''}
		</List.Item>
	)
}

export default SelectedItem;