define("textArea",["core","lodash","textCommon","santaProps"],function(a,b,c,d){"use strict";var e=a.compMixins;return{displayName:"TextArea",mixins:[e.skinBasedComp,e.runTimeCompData,c.textScaleMixin,a.compMixins.inputFocusMixin],propTypes:{compData:d.Types.Component.compData,compProp:d.Types.Component.compProp},statics:{useSantaTypes:true,behaviors:a.compMixins.inputFocusMixin.INPUT_FOCUS_BEHAVIORS},focus:function(){this.refs.textarea.focus()},blur:function(){this.refs.textarea.blur()},getInitialState:function(){return b.assign(this.getCssState(this.props),{value:this.props.compData.value})},componentWillReceiveProps:function(a){var c=this.getCssState(a);if(b.has(a.compData,"value")&&a.compData.value!==this.state.value){c.value=a.compData.value}this.setState(c)},getCssState:function(a){return{$validation:a.compProp.message?"invalid":"valid",$label:a.compProp.label?"hasLabel":"noLabel"}},onClick:function(a){a.stopPropagation();if(this.props.compProp.isPreset){a.target.select()}},onKeyDown:function(a){a.stopPropagation()},onKeyUp:function(a){this.handleAction("keyPress",a)},onChange:function(a){var b=a.target.value;this.setState({value:b},function(){this.updateData({value:b});this.handleAction("change",a)}.bind(this))},handleFocus:function(a){this.handleAction("focus",a)},onBlur:function(a){this.handleAction("blur",a)},getSkinProperties:function(){var a=this.props.compProp;var c=this.props.compData;var d={style:{display:"none"}};var e=function b(){return{children:a.message,style:{whiteSpace:"normal"}}};var f={};f[this.props.compProp.textAlignment+"-direction"]=true;var g={"":{className:this.classSet(f)},label:a.label?{children:a.label}:d,textarea:{value:this.state.value,maxLength:c.maxLength,placeholder:a.placeholder,onChange:a.onChange||this.onChange,onClick:this.onClick,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onFocus:this.handleFocus,onBlur:a.onBlur||this.onBlur,disabled:a.isDisabled,required:a.required,readOnly:a.readOnly,tabIndex:a.tabIndex},errorMessage:a.message?e():d};g.textarea=b.merge({style:b.merge(this.getFontSize(this.props),{paddingLeft:this.props.compProp.textPadding,paddingRight:this.props.compProp.textPadding})},g.textarea,{"data-preview":b.isFunction(this.getComponentPreviewState)&&this.getComponentPreviewState()});return g}}});