{"ast":null,"code":"import * as React from 'react';\nimport Animated from \"react-native-web/dist/exports/Animated\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport { useInternalTheme } from \"../../../core/theming\";\nexport const Underline = ({\n  parentState,\n  error,\n  colors,\n  activeColor,\n  underlineColorCustom,\n  hasActiveOutline,\n  style,\n  theme: themeOverrides\n}) => {\n  const {\n    isV3\n  } = useInternalTheme(themeOverrides);\n  let backgroundColor = parentState.focused ? activeColor : underlineColorCustom;\n  if (error) backgroundColor = colors === null || colors === void 0 ? void 0 : colors.error;\n  const activeScale = isV3 ? 2 : 1;\n  return React.createElement(Animated.View, {\n    testID: \"text-input-underline\",\n    style: [styles.underline, isV3 && styles.md3Underline, {\n      backgroundColor,\n      transform: [{\n        scaleY: (isV3 ? hasActiveOutline : parentState.focused) ? activeScale : 0.5\n      }]\n    }, style]\n  });\n};\nconst styles = StyleSheet.create({\n  underline: {\n    position: 'absolute',\n    left: 0,\n    right: 0,\n    bottom: 0,\n    height: 2,\n    zIndex: 1\n  },\n  md3Underline: {\n    height: 1\n  }\n});","map":{"version":3,"names":["React","Animated","StyleSheet","useInternalTheme","Underline","parentState","error","colors","activeColor","underlineColorCustom","hasActiveOutline","style","theme","themeOverrides","isV3","backgroundColor","focused","activeScale","createElement","View","testID","styles","underline","md3Underline","transform","scaleY","create","position","left","right","bottom","height","zIndex"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/TextInput/Addons/Underline.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Animated, StyleSheet, StyleProp, ViewStyle } from 'react-native';\n\nimport type { ThemeProp } from 'src/types';\n\nimport { useInternalTheme } from '../../../core/theming';\n\ntype UnderlineProps = {\n  parentState: {\n    focused: boolean;\n  };\n  error?: boolean;\n  colors?: {\n    error?: string;\n  };\n  activeColor: string;\n  underlineColorCustom?: string;\n  hasActiveOutline?: boolean;\n  style?: StyleProp<ViewStyle>;\n  theme?: ThemeProp;\n};\n\nexport const Underline = ({\n  parentState,\n  error,\n  colors,\n  activeColor,\n  underlineColorCustom,\n  hasActiveOutline,\n  style,\n  theme: themeOverrides,\n}: UnderlineProps) => {\n  const { isV3 } = useInternalTheme(themeOverrides);\n\n  let backgroundColor = parentState.focused\n    ? activeColor\n    : underlineColorCustom;\n\n  if (error) backgroundColor = colors?.error;\n\n  const activeScale = isV3 ? 2 : 1;\n\n  return (\n    <Animated.View\n      testID=\"text-input-underline\"\n      style={[\n        styles.underline,\n        isV3 && styles.md3Underline,\n        {\n          backgroundColor,\n          // Underlines is thinner when input is not focused\n          transform: [\n            {\n              scaleY: (isV3 ? hasActiveOutline : parentState.focused)\n                ? activeScale\n                : 0.5,\n            },\n          ],\n        },\n        style,\n      ]}\n    />\n  );\n};\n\nconst styles = StyleSheet.create({\n  underline: {\n    position: 'absolute',\n    left: 0,\n    right: 0,\n    bottom: 0,\n    height: 2,\n    zIndex: 1,\n  },\n  md3Underline: {\n    height: 1,\n  },\n});\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,QAAA;AAAA,OAAAC,UAAA;AAK9B,SAASC,gBAAgB;AAiBzB,OAAO,MAAMC,SAAS,GAAGA,CAAC;EACxBC,WAAW;EACXC,KAAK;EACLC,MAAM;EACNC,WAAW;EACXC,oBAAoB;EACpBC,gBAAgB;EAChBC,KAAK;EACLC,KAAK,EAAEC;AACO,CAAC,KAAK;EACpB,MAAM;IAAEC;EAAK,CAAC,GAAGX,gBAAgB,CAACU,cAAc,CAAC;EAEjD,IAAIE,eAAe,GAAGV,WAAW,CAACW,OAAO,GACrCR,WAAW,GACXC,oBAAoB;EAExB,IAAIH,KAAK,EAAES,eAAe,GAAGR,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAED,KAAK;EAE1C,MAAMW,WAAW,GAAGH,IAAI,GAAG,CAAC,GAAG,CAAC;EAEhC,OACEd,KAAA,CAAAkB,aAAA,CAACjB,QAAQ,CAACkB,IAAI;IACZC,MAAM,EAAC,sBAAsB;IAC7BT,KAAK,EAAE,CACLU,MAAM,CAACC,SAAS,EAChBR,IAAI,IAAIO,MAAM,CAACE,YAAY,EAC3B;MACER,eAAe;MAEfS,SAAS,EAAE,CACT;QACEC,MAAM,EAAE,CAACX,IAAI,GAAGJ,gBAAgB,GAAGL,WAAW,CAACW,OAAO,IAClDC,WAAW,GACX;MACN,CAAC;IAEL,CAAC,EACDN,KAAK;EACL,CACH,CAAC;AAEN,CAAC;AAED,MAAMU,MAAM,GAAGnB,UAAU,CAACwB,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE;EACV,CAAC;EACDT,YAAY,EAAE;IACZQ,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}