import React, { Component } from 'react'
import './SelectedVariable.css'
import TagMap from './TagMap'
import R from 'ramda'
export default class SelectedVariable extends Component {
render() {
let {
variable: {
name,
first: {
description
},
tags,
calculable
},
selectedTags
} = this.props,
tagsList = R.pluck('tags', calculable),
commonTags = R.tail(tagsList).reduce(
(result, next) => R.intersection(result, R.toPairs(next)),
R.toPairs(R.head(tagsList))
),
itemsWithUniqueTags = R.map(item => [item, R.fromPairs(R.difference(R.toPairs(item.tags), commonTags))], calculable)
return (
{description}{name}
{Object.keys(tags)
.filter(name => !selectedTags.find(([n]) => name == n))
.map(name =>
*/}