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

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

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

export default SelectedItem;