var CheckResultStatusForm=React.createClass({displayName:"CheckResultStatusForm",getInitialState:function(){return{barcode:"",status:-1,fetchingStatus:!1}},componentDidMount:function(){},_handleBarcodeChange:function(n){n.target.value.length<=16&&this.setState({barcode:n.target.value})},handleCheckBarcode:function(n){n.preventDefault();var t=this;this.setState({fetchingStatus:!0});this.state.barcode.length>10&&$.ajax({url:"/api/form/CheckTestStatus?barcode="+this.state.barcode,type:"GET",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var i=t.state;n?(i.status=n.result,t.setState(i)):(i.status=-2,t.setState(i))}});setTimeout(function(){t.setState({fetchingStatus:!1})},3e3)},getTestStatus:function(n){return n===0?this._getLanguageString("Staða: Ekki kominn"):n===1?this._getLanguageString("Staða: Í vinnslu"):n===2?this._getLanguageString("Staða: Neikvætt próf"):n===3?this._getLanguageString("Staða: Í vinnslu"):n===-2?this._getLanguageString("Staða: Ekkert fannst"):""},getTestClass:function(n){return n===0?" not-arrived":n===1?" pending":n===2?" negative":n===3?" pending":n===-2?" nothing-found":""},_getLanguageString:function(n){return this.props.languageLookup(n)},render:function(){var n=this;return React.createElement("div",null,React.createElement("div",{className:"form-group col-md-8"},React.createElement("label",{htmlFor:"txtBarcode"},this._getLanguageString("Barcode")),React.createElement("input",{type:"text",id:"txtBarcode",onKeyPress:this.handleKeyPressed,onChange:this._handleBarcodeChange,value:this.state.barcode,className:"form-control",disabled:this.state.fetchingStatus,autoComplete:"off"})),React.createElement("div",{className:"form-group col-md-4"},React.createElement("button",{id:"btnCheckBarcode",onClick:this.handleCheckBarcode,className:"btn btn-primary btn-inline",disabled:this.state.fetchingStatus},this._getLanguageString("Athuga stöðu"))),this.state.fetchingStatus?React.createElement("div",{className:"form-group col-md-12"},this._getLanguageString("Sæki gögn")):React.createElement("div",{className:"form-group col-md-12"+(this.state.status===undefined||this.state.status===-1?" no-disp":"")},React.createElement("div",{className:"results"+this.getTestClass(this.state.status)},React.createElement("strong",null,this._getLanguageString("Test status"))," ",React.createElement("i",null,this.getTestStatus(this.state.status)))))}})