text: var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf3=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _TouchableNativeFeedbackSafe=_interopRequireDefault(require("./TouchableNativeFeedbackSafe"));var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/ActionSheet/ActionGroup.tsx";var BLACK_54PC_TRANSPARENT='#0000008a';var BLACK_87PC_TRANSPARENT='#000000de';var DESTRUCTIVE_COLOR='#d32f2f';var ActionGroup=function(_React$Component){(0,_inherits2.default)(ActionGroup,_React$Component);function ActionGroup(){var _getPrototypeOf2;var _this;(0,_classCallCheck2.default)(this,ActionGroup);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=(0,_possibleConstructorReturn2.default)(this,(_getPrototypeOf2=(0,_getPrototypeOf3.default)(ActionGroup)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._renderRowSeparator=function(key){return React.createElement(_reactNative.View,{key:"separator-"+key,style:[styles.rowSeparator,_this.props.separatorStyle],__source:{fileName:_jsxFileName,lineNumber:37}});};_this._renderTitleContent=function(){var _this$props=_this.props,title=_this$props.title,titleTextStyle=_this$props.titleTextStyle,message=_this$props.message,messageTextStyle=_this$props.messageTextStyle,showSeparators=_this$props.showSeparators;if(!title&&!message){return null;}return React.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:49}},React.createElement(_reactNative.View,{style:[styles.titleContainer,{paddingBottom:showSeparators?24:16}],__source:{fileName:_jsxFileName,lineNumber:50}},!!title&&React.createElement(_reactNative.Text,{style:[styles.title,titleTextStyle],__source:{fileName:_jsxFileName,lineNumber:51}},title),!!message&&React.createElement(_reactNative.Text,{style:[styles.message,messageTextStyle],__source:{fileName:_jsxFileName,lineNumber:52}},message)),!!showSeparators&&_this._renderRowSeparator('title'));};_this._renderIconElement=function(iconSource,color){var tintIcons=_this.props.tintIcons;if(!iconSource){return null;}if(typeof iconSource==='number'){var iconStyle=[styles.icon,{tintColor:tintIcons?color:undefined}];return React.createElement(_reactNative.Image,{fadeDuration:0,source:iconSource,resizeMode:"contain",style:iconStyle,__source:{fileName:_jsxFileName,lineNumber:67}});}else{return React.createElement(_reactNative.View,{style:styles.icon,__source:{fileName:_jsxFileName,lineNumber:69}},iconSource);}};_this._renderOptionViews=function(){var _this$props2=_this.props,options=_this$props2.options,icons=_this$props2.icons,destructiveButtonIndex=_this$props2.destructiveButtonIndex,onSelect=_this$props2.onSelect,startIndex=_this$props2.startIndex,length=_this$props2.length,textStyle=_this$props2.textStyle,tintColor=_this$props2.tintColor,showSeparators=_this$props2.showSeparators;var optionViews=[];var nativeFeedbackBackground=_TouchableNativeFeedbackSafe.default.Ripple('rgba(180, 180, 180, 1)',false);var _loop=function _loop(_i){var defaultColor=tintColor?tintColor:(textStyle||{}).color||BLACK_87PC_TRANSPARENT;var color=_i===destructiveButtonIndex?DESTRUCTIVE_COLOR:defaultColor;var iconSource=icons!=null?icons[_i]:null;optionViews.push(React.createElement(_TouchableNativeFeedbackSafe.default,{key:_i,pressInDelay:0,background:nativeFeedbackBackground,onPress:function onPress(){return onSelect(_i);},style:styles.button,accessibilityLabel:options[_i],__source:{fileName:_jsxFileName,lineNumber:99}},_this._renderIconElement(iconSource,color),React.createElement(_reactNative.Text,{style:[styles.text,textStyle,{color:color}],__source:{fileName:_jsxFileName,lineNumber:107}},options[_i])));if(showSeparators&&_i<startIndex+length-1){optionViews.push(_this._renderRowSeparator(_i));}};for(var _i=startIndex;_i<startIndex+length;_i++){_loop(_i);}return optionViews;};return _this;}(0,_createClass2.default)(ActionGroup,[{key:"render",value:function render(){return React.createElement(_reactNative.View,{style:[styles.groupContainer,this.props.containerStyle],__source:{fileName:_jsxFileName,lineNumber:28}},this._renderTitleContent(),React.createElement(_reactNative.ScrollView,{__source:{fileName:_jsxFileName,lineNumber:30}},this._renderOptionViews()));}}]);return ActionGroup;}(React.Component);exports.default=ActionGroup;ActionGroup.defaultProps={title:null,message:null,showSeparators:false,tintIcons:true,textStyle:{}};var styles=_reactNative.StyleSheet.create({button:{justifyContent:'flex-start',alignItems:'center',flexDirection:'row',height:56,paddingHorizontal:16},groupContainer:{backgroundColor:'#ffffff',overflow:'hidden'},icon:{width:24,height:24,marginRight:32},message:{marginTop:12,fontSize:14,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},rowSeparator:{backgroundColor:'#dddddd',height:1,width:'100%'},text:{fontSize:16,color:BLACK_87PC_TRANSPARENT,textAlignVertical:'center'},title:{fontSize:16,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},titleContainer:{alignItems:'flex-start',padding:16,paddingTop:24}});
  //# sourceMappingURL=ActionGroup.js.map