text: import _extends from"@babel/runtime/helpers/extends";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/Users/satya/Workspace/Projects/navigation-ex/packages/drawer/src/views/DrawerItem.tsx";import*as React from'react';import{Text,View,StyleSheet}from'react-native';import{useTheme}from'@react-navigation/native';import Color from'color';import TouchableItem from'./TouchableItem';export default function DrawerItem(props){var _useTheme=useTheme(),colors=_useTheme.colors;var icon=props.icon,label=props.label,labelStyle=props.labelStyle,_props$focused=props.focused,focused=_props$focused===void 0?false:_props$focused,_props$activeTintColo=props.activeTintColor,activeTintColor=_props$activeTintColo===void 0?colors.primary:_props$activeTintColo,_props$inactiveTintCo=props.inactiveTintColor,inactiveTintColor=_props$inactiveTintCo===void 0?Color(colors.text).alpha(0.68).rgb().string():_props$inactiveTintCo,_props$activeBackgrou=props.activeBackgroundColor,activeBackgroundColor=_props$activeBackgrou===void 0?Color(activeTintColor).alpha(0.12).rgb().string():_props$activeBackgrou,_props$inactiveBackgr=props.inactiveBackgroundColor,inactiveBackgroundColor=_props$inactiveBackgr===void 0?'transparent':_props$inactiveBackgr,style=props.style,onPress=props.onPress,rest=_objectWithoutProperties(props,["icon","label","labelStyle","focused","activeTintColor","inactiveTintColor","activeBackgroundColor","inactiveBackgroundColor","style","onPress"]);var _StyleSheet$flatten=StyleSheet.flatten(style||{}),_StyleSheet$flatten$b=_StyleSheet$flatten.borderRadius,borderRadius=_StyleSheet$flatten$b===void 0?4:_StyleSheet$flatten$b;var color=focused?activeTintColor:inactiveTintColor;var backgroundColor=focused?activeBackgroundColor:inactiveBackgroundColor;var iconNode=icon?icon({size:24,focused:focused,color:color}):null;return React.createElement(View,_extends({collapsable:false},rest,{style:[styles.container,{borderRadius:borderRadius,backgroundColor:backgroundColor},style],__source:{fileName:_jsxFileName,lineNumber:98}}),React.createElement(TouchableItem,{borderless:true,delayPressIn:0,onPress:onPress,style:[styles.wrapper,{borderRadius:borderRadius}],accessibilityTraits:focused?['button','selected']:'button',accessibilityComponentType:"button",accessibilityRole:"button",accessibilityStates:focused?['selected']:[],__source:{fileName:_jsxFileName,lineNumber:103}},React.createElement(React.Fragment,{__source:{fileName:_jsxFileName,lineNumber:113}},iconNode,React.createElement(View,{style:[styles.label,{marginLeft:iconNode?32:0,marginVertical:5}],__source:{fileName:_jsxFileName,lineNumber:115}},typeof label==='string'?React.createElement(Text,{numberOfLines:1,style:[{color:color,fontWeight:'500'},labelStyle],__source:{fileName:_jsxFileName,lineNumber:122}},label):label({color:color,focused:focused})))));}var styles=StyleSheet.create({container:{marginHorizontal:10,marginVertical:4},wrapper:{flexDirection:'row',alignItems:'center',padding:8},label:{marginRight:32}});
  //# sourceMappingURL=DrawerItem.js.map