var InputContentCategory=api.InputContentCategory=api.extendReactClass('MixinInput',{getDefaultProps:function(){return{getCategoryList:api.urls.ajaxBase+'&action=getContentCategory'};},getInitialState:function(){return{value:this.props.value,options:[]};},componentWillMount:function(){this.parent();this.loading=true;api.Ajax.request(this.props.getCategoryList,function(req){var response=req.responseJSON;this.loading=false;if(response.type=='success'){this.setState({options:response.data});}}.bind(this));},render:function(){var options=[],selected;options.push(React.createElement('option',{value:''},api.Text.parse(this.loading?'JSN_EXTFW_LOADING':'JSN_EXTFW_SELECT_CONTENT_CATEGORY')));this.state.options.forEach(option=>{if(this.props.control.multiple){selected=this.state.value.indexOf(option.value)>-1?true:false;}else{selected=this.state.value==option.value?true:false;}options.push(React.createElement('option',{value:option.value,selected:selected,disabled:option.disable},option.text));});return React.createElement('div',{key:this.props.id||api.Text.toId(),className:'form-group '+(this.props.control['class']||this.props.control.className||'')},React.createElement('label',{className:this.props.control.labelClass||''},this.label,this.tooltip),this.props.control.inputClass?React.createElement('div',{className:this.props.control.inputClass},React.createElement('select',{ref:'field',name:this.props.setting+(this.props.control.multiple?'[]':''),multiple:this.props.control.multiple?true:false,onChange:this.change,className:'form-control'},options)):React.createElement('select',{ref:'field',name:this.props.setting+(this.props.control.multiple?'[]':''),multiple:this.props.control.multiple?true:false,onChange:this.change,className:'form-control'},options));},initActions:function(){this.parent();if(this.refs.field&&!this._initialized_chosen){this.initChosen({disable_search:false},true);this._initialized_chosen=true;}}});