content: import React from 'react';
  
  import { SegmentedControl } from 'elemental';
  
  const OPTIONS = [
  	{ label: 'Is Set', value: true },
  	{ label: 'Is NOT Set', value: false },
  ];
  
  function getDefaultValue () {
  	return {
  		exists: true,
  	};
  }
  
  var CloudinaryImageFilter = React.createClass({
  	propTypes: {
  		filter: React.PropTypes.shape({
  			exists: React.PropTypes.oneOf(OPTIONS.map(i => i.value)),
  		}),
  	},
  	statics: {
  		getDefaultValue: getDefaultValue,
  	},
  	getDefaultProps () {
  		return {
  			filter: getDefaultValue(),
  		};
  	},
  	toggleExists (value) {
  		this.props.onChange({ exists: value });
  	},
  	render () {
  		const { filter } = this.props;
  
  		return (
  			<SegmentedControl
  				equalWidthSegments
  				onChange={this.toggleExists}
  				options={OPTIONS}
  				value={filter.exists}
  			/>
  		);
  	},
  });
  
  module.exports = CloudinaryImageFilter;
  