{"version":3,"sources":["TabBarIcon.tsx"],"names":["TabBarIcon","horizontal","badge","badgeStyle","activeOpacity","inactiveOpacity","activeTintColor","inactiveTintColor","renderIcon","style","size","styles","iconHorizontal","iconVertical","icon","opacity","focused","color","badgeHorizontal","badgeVertical","StyleSheet","create","position","alignSelf","alignItems","justifyContent","height","width","minWidth","flex","marginTop","left","top"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;;;AAmBe,SAASA,UAAT,CAAoB;AACjCC,EAAAA,UADiC;AAEjCC,EAAAA,KAFiC;AAGjCC,EAAAA,UAHiC;AAIjCC,EAAAA,aAJiC;AAKjCC,EAAAA,eALiC;AAMjCC,EAAAA,eANiC;AAOjCC,EAAAA,iBAPiC;AAQjCC,EAAAA,UARiC;AASjCC,EAAAA;AATiC,CAApB,EAUL;AACR,QAAMC,IAAI,GAAG,EAAb,CADQ,CAGR;AACA;;AACA,sBACE,6BAAC,iBAAD;AACE,IAAA,KAAK,EAAE,CAACT,UAAU,GAAGU,MAAM,CAACC,cAAV,GAA2BD,MAAM,CAACE,YAA7C,EAA2DJ,KAA3D;AADT,kBAGE,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAACE,MAAM,CAACG,IAAR,EAAc;AAAEC,MAAAA,OAAO,EAAEX;AAAX,KAAd;AAAb,KACGI,UAAU,CAAC;AACVQ,IAAAA,OAAO,EAAE,IADC;AAEVN,IAAAA,IAFU;AAGVO,IAAAA,KAAK,EAAEX;AAHG,GAAD,CADb,CAHF,eAUE,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAACK,MAAM,CAACG,IAAR,EAAc;AAAEC,MAAAA,OAAO,EAAEV;AAAX,KAAd;AAAb,KACGG,UAAU,CAAC;AACVQ,IAAAA,OAAO,EAAE,KADC;AAEVN,IAAAA,IAFU;AAGVO,IAAAA,KAAK,EAAEV;AAHG,GAAD,CADb,CAVF,eAiBE,6BAAC,cAAD;AACE,IAAA,OAAO,EAAEL,KAAK,IAAI,IADpB;AAEE,IAAA,KAAK,EAAE,CACLS,MAAM,CAACT,KADF,EAELD,UAAU,GAAGU,MAAM,CAACO,eAAV,GAA4BP,MAAM,CAACQ,aAFxC,EAGLhB,UAHK,CAFT;AAOE,IAAA,IAAI,EAAGO,IAAI,GAAG,CAAR,GAAa;AAPrB,KASGR,KATH,CAjBF,CADF;AA+BD;;AAED,MAAMS,MAAM,GAAGS,wBAAWC,MAAX,CAAkB;AAC/BP,EAAAA,IAAI,EAAE;AACJ;AACA;AACA;AACAQ,IAAAA,QAAQ,EAAE,UAJN;AAKJC,IAAAA,SAAS,EAAE,QALP;AAMJC,IAAAA,UAAU,EAAE,QANR;AAOJC,IAAAA,cAAc,EAAE,QAPZ;AAQJC,IAAAA,MAAM,EAAE,MARJ;AASJC,IAAAA,KAAK,EAAE,MATH;AAUJ;AACAC,IAAAA,QAAQ,EAAE;AAXN,GADyB;AAc/Bf,EAAAA,YAAY,EAAE;AACZgB,IAAAA,IAAI,EAAE;AADM,GAdiB;AAiB/BjB,EAAAA,cAAc,EAAE;AACdc,IAAAA,MAAM,EAAE,MADM;AAEdI,IAAAA,SAAS,EAAE;AAFG,GAjBe;AAqB/B5B,EAAAA,KAAK,EAAE;AACLoB,IAAAA,QAAQ,EAAE,UADL;AAELS,IAAAA,IAAI,EAAE;AAFD,GArBwB;AAyB/BZ,EAAAA,aAAa,EAAE;AACba,IAAAA,GAAG,EAAE;AADQ,GAzBgB;AA4B/Bd,EAAAA,eAAe,EAAE;AACfc,IAAAA,GAAG,EAAE;AADU;AA5Bc,CAAlB,CAAf","sourcesContent":["import React from 'react';\nimport {\n View,\n StyleSheet,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native';\nimport type { Route } from '@react-navigation/native';\nimport Badge from './Badge';\n\ntype Props = {\n route: Route;\n horizontal: boolean;\n badge?: string | number;\n badgeStyle?: StyleProp;\n activeOpacity: number;\n inactiveOpacity: number;\n activeTintColor: string;\n inactiveTintColor: string;\n renderIcon: (props: {\n focused: boolean;\n color: string;\n size: number;\n }) => React.ReactNode;\n style: StyleProp;\n};\n\nexport default function TabBarIcon({\n horizontal,\n badge,\n badgeStyle,\n activeOpacity,\n inactiveOpacity,\n activeTintColor,\n inactiveTintColor,\n renderIcon,\n style,\n}: Props) {\n const size = 25;\n\n // We render the icon twice at the same position on top of each other:\n // active and inactive one, so we can fade between them.\n return (\n \n \n {renderIcon({\n focused: true,\n size,\n color: activeTintColor,\n })}\n \n \n {renderIcon({\n focused: false,\n size,\n color: inactiveTintColor,\n })}\n \n \n {badge}\n \n \n );\n}\n\nconst styles = StyleSheet.create({\n icon: {\n // We render the icon twice at the same position on top of each other:\n // active and inactive one, so we can fade between them:\n // Cover the whole iconContainer:\n position: 'absolute',\n alignSelf: 'center',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%',\n width: '100%',\n // Workaround for react-native >= 0.54 layout bug\n minWidth: 25,\n },\n iconVertical: {\n flex: 1,\n },\n iconHorizontal: {\n height: '100%',\n marginTop: 3,\n },\n badge: {\n position: 'absolute',\n left: 3,\n },\n badgeVertical: {\n top: 3,\n },\n badgeHorizontal: {\n top: 7,\n },\n});\n"]}