import React from 'react'
import { SearchFilterItem } from '../../types/searchSelect'

import FilterItemContainer from '../FilterItemContainer'
import FilterItemContent from '../FilterItemContent'

type ComponentProps = {
  filter: SearchFilterItem
}

const AnalysisFilterItem: React.FC<ComponentProps> = ({ filter }) => {
  return (
    <FilterItemContainer name={filter.tag.name || filter.tag.key}>
      <FilterItemContent filter={filter} />
    </FilterItemContainer>
  )
}

export default AnalysisFilterItem
