/** @jsx React.DOM */
/**
 * Copyright (c) 2014, Tidepool Project
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the associated License, which is identical to the BSD 2-Clause
 * License as published by the Open Source Initiative at opensource.org.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the License for more details.
 *
 * You should have received a copy of the License along with this program; if
 * not, you can obtain one from Tidepool Project at tidepool.org.
 */
var React = require('react');
var _ = require('lodash');
var cx = require('react/lib/cx');

var api = require('../../core/api');

var PatientCard = React.createClass({
  propTypes: {
    invitation: React.PropTypes.object,
    patientsComponent: React.PropTypes.component,
    onAcceptInvitation: onSubmit: React.PropTypes.func,
    onDismissInvitation: onSubmit: React.PropTypes.func
  },
  handleAccept: function() {
    this.props.onAcceptInvitation(this.props.invitation);
  },
  handleDismiss: function() {
    this.props.onDismissInvitation(this.props.invitation);
  },
  render: function() {
    var invitation = this.props.invitation;

    if(this.state && this.state.dismiss) {
      /* jshint ignore:start */
      return (<span />);
      /* jshint ignore:end */
    }

    var message = 'You have been invited to see ' + invitation.from.profile.fullName + '\'s data!';
    /* jshint ignore:start */
    return (
      <li className='invitation'>
        <div className='invitation-message'>{message}</div>
        <div className='invitation-action'>
          <button
            className='invitation-action-submit btn btn-primary js-form-submit'
            onClick={this.handleAccept}
            disabled={this.state ? this.state.enable : false}
            ref="submitButton">{'Join the Team!'}</button>
          <button
            className="invitation-action-ignore btn js-form-submit"
            onClick={this.handleDismiss}
            disabled={this.state ? this.state.enable : false}
            ref="ignoreButton">{'Ignore'}</button>
        </div>
      </li>
    );
    /* jshint ignore:end */
  }
});

module.exports = PatientCard;

@@ -1275,190 +1275,8 @@
 ) %7B%0A
-    var invitation = this.props.invitation;%0A%0A    if(this.state && this.state.dismiss) %7B%0A      /* jshint ignore:start */%0A      return (%3Cspan /%3E);%0A      /* jshint ignore:end */%0A    %7D%0A%0A
     
@@ -1323,16 +1323,27 @@
 see ' + 
+this.props.
 invitati

remove dismiss