{"ast":null,"code":"import color from 'color';\nconst getAndroidCheckedColor = ({\n  theme,\n  customColor\n}) => {\n  if (customColor) {\n    return customColor;\n  }\n  if (theme.isV3) {\n    return theme.colors.primary;\n  }\n  return theme.colors.accent;\n};\nconst getAndroidUncheckedColor = ({\n  theme,\n  customUncheckedColor\n}) => {\n  if (customUncheckedColor) {\n    return customUncheckedColor;\n  }\n  if (theme.isV3) {\n    return theme.colors.onSurfaceVariant;\n  }\n  if (theme.dark) {\n    return color(theme.colors.text).alpha(0.7).rgb().string();\n  }\n  return color(theme.colors.text).alpha(0.54).rgb().string();\n};\nconst getAndroidRippleColor = ({\n  theme,\n  checkedColor,\n  disabled\n}) => {\n  if (disabled) {\n    if (theme.isV3) {\n      return color(theme.colors.onSurface).alpha(0.16).rgb().string();\n    }\n    return color(theme.colors.text).alpha(0.16).rgb().string();\n  }\n  return color(checkedColor).fade(0.32).rgb().string();\n};\nconst getAndroidControlColor = ({\n  theme,\n  checked,\n  disabled,\n  checkedColor,\n  uncheckedColor\n}) => {\n  if (disabled) {\n    if (theme.isV3) {\n      return theme.colors.onSurfaceDisabled;\n    }\n    return theme.colors.disabled;\n  }\n  if (checked) {\n    return checkedColor;\n  }\n  return uncheckedColor;\n};\nexport const getAndroidSelectionControlColor = ({\n  theme,\n  disabled,\n  checked,\n  customColor,\n  customUncheckedColor\n}) => {\n  const checkedColor = getAndroidCheckedColor({\n    theme,\n    customColor\n  });\n  const uncheckedColor = getAndroidUncheckedColor({\n    theme,\n    customUncheckedColor\n  });\n  return {\n    rippleColor: getAndroidRippleColor({\n      theme,\n      checkedColor,\n      disabled\n    }),\n    selectionControlColor: getAndroidControlColor({\n      theme,\n      disabled,\n      checked,\n      checkedColor,\n      uncheckedColor\n    })\n  };\n};\nconst getIOSCheckedColor = ({\n  theme,\n  disabled,\n  customColor\n}) => {\n  if (disabled) {\n    if (theme.isV3) {\n      return theme.colors.onSurfaceDisabled;\n    }\n    return theme.colors.disabled;\n  }\n  if (customColor) {\n    return customColor;\n  }\n  if (theme.isV3) {\n    return theme.colors.primary;\n  }\n  return theme.colors.accent;\n};\nconst getIOSRippleColor = ({\n  theme,\n  checkedColor,\n  disabled\n}) => {\n  if (disabled) {\n    if (theme.isV3) {\n      return color(theme.colors.onSurface).alpha(0.16).rgb().string();\n    }\n    return color(theme.colors.text).alpha(0.16).rgb().string();\n  }\n  return color(checkedColor).fade(0.32).rgb().string();\n};\nexport const getSelectionControlIOSColor = ({\n  theme,\n  disabled,\n  customColor\n}) => {\n  const checkedColor = getIOSCheckedColor({\n    theme,\n    disabled,\n    customColor\n  });\n  return {\n    checkedColor,\n    rippleColor: getIOSRippleColor({\n      theme,\n      checkedColor,\n      disabled\n    })\n  };\n};","map":{"version":3,"names":["color","getAndroidCheckedColor","theme","customColor","isV3","colors","primary","accent","getAndroidUncheckedColor","customUncheckedColor","onSurfaceVariant","dark","text","alpha","rgb","string","getAndroidRippleColor","checkedColor","disabled","onSurface","fade","getAndroidControlColor","checked","uncheckedColor","onSurfaceDisabled","getAndroidSelectionControlColor","rippleColor","selectionControlColor","getIOSCheckedColor","getIOSRippleColor","getSelectionControlIOSColor"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Checkbox/utils.ts"],"sourcesContent":["import color from 'color';\n\nimport type { InternalTheme } from '../../types';\n\nconst getAndroidCheckedColor = ({\n  theme,\n  customColor,\n}: {\n  theme: InternalTheme;\n  customColor?: string;\n}) => {\n  if (customColor) {\n    return customColor;\n  }\n\n  if (theme.isV3) {\n    return theme.colors.primary;\n  }\n\n  return theme.colors.accent;\n};\n\nconst getAndroidUncheckedColor = ({\n  theme,\n  customUncheckedColor,\n}: {\n  theme: InternalTheme;\n  customUncheckedColor?: string;\n}) => {\n  if (customUncheckedColor) {\n    return customUncheckedColor;\n  }\n\n  if (theme.isV3) {\n    return theme.colors.onSurfaceVariant;\n  }\n\n  if (theme.dark) {\n    return color(theme.colors.text).alpha(0.7).rgb().string();\n  }\n\n  return color(theme.colors.text).alpha(0.54).rgb().string();\n};\n\nconst getAndroidRippleColor = ({\n  theme,\n  checkedColor,\n  disabled,\n}: {\n  theme: InternalTheme;\n  checkedColor: string;\n  disabled?: boolean;\n}) => {\n  if (disabled) {\n    if (theme.isV3) {\n      return color(theme.colors.onSurface).alpha(0.16).rgb().string();\n    }\n    return color(theme.colors.text).alpha(0.16).rgb().string();\n  }\n\n  return color(checkedColor).fade(0.32).rgb().string();\n};\n\nconst getAndroidControlColor = ({\n  theme,\n  checked,\n  disabled,\n  checkedColor,\n  uncheckedColor,\n}: {\n  theme: InternalTheme;\n  checked: boolean;\n  checkedColor: string;\n  uncheckedColor: string;\n  disabled?: boolean;\n}) => {\n  if (disabled) {\n    if (theme.isV3) {\n      return theme.colors.onSurfaceDisabled;\n    }\n    return theme.colors.disabled;\n  }\n\n  if (checked) {\n    return checkedColor;\n  }\n  return uncheckedColor;\n};\n\nexport const getAndroidSelectionControlColor = ({\n  theme,\n  disabled,\n  checked,\n  customColor,\n  customUncheckedColor,\n}: {\n  theme: InternalTheme;\n  checked: boolean;\n  disabled?: boolean;\n  customColor?: string;\n  customUncheckedColor?: string;\n}) => {\n  const checkedColor = getAndroidCheckedColor({ theme, customColor });\n  const uncheckedColor = getAndroidUncheckedColor({\n    theme,\n    customUncheckedColor,\n  });\n  return {\n    rippleColor: getAndroidRippleColor({ theme, checkedColor, disabled }),\n    selectionControlColor: getAndroidControlColor({\n      theme,\n      disabled,\n      checked,\n      checkedColor,\n      uncheckedColor,\n    }),\n  };\n};\n\nconst getIOSCheckedColor = ({\n  theme,\n  disabled,\n  customColor,\n}: {\n  theme: InternalTheme;\n  customColor?: string;\n  disabled?: boolean;\n}) => {\n  if (disabled) {\n    if (theme.isV3) {\n      return theme.colors.onSurfaceDisabled;\n    }\n    return theme.colors.disabled;\n  }\n\n  if (customColor) {\n    return customColor;\n  }\n\n  if (theme.isV3) {\n    return theme.colors.primary;\n  }\n\n  return theme.colors.accent;\n};\n\nconst getIOSRippleColor = ({\n  theme,\n  checkedColor,\n  disabled,\n}: {\n  theme: InternalTheme;\n  checkedColor: string;\n  disabled?: boolean;\n}) => {\n  if (disabled) {\n    if (theme.isV3) {\n      return color(theme.colors.onSurface).alpha(0.16).rgb().string();\n    }\n    return color(theme.colors.text).alpha(0.16).rgb().string();\n  }\n  return color(checkedColor).fade(0.32).rgb().string();\n};\n\nexport const getSelectionControlIOSColor = ({\n  theme,\n  disabled,\n  customColor,\n}: {\n  theme: InternalTheme;\n  disabled?: boolean;\n  customColor?: string;\n}) => {\n  const checkedColor = getIOSCheckedColor({ theme, disabled, customColor });\n  return {\n    checkedColor,\n    rippleColor: getIOSRippleColor({\n      theme,\n      checkedColor,\n      disabled,\n    }),\n  };\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAIzB,MAAMC,sBAAsB,GAAGA,CAAC;EAC9BC,KAAK;EACLC;AAIF,CAAC,KAAK;EACJ,IAAIA,WAAW,EAAE;IACf,OAAOA,WAAW;EACpB;EAEA,IAAID,KAAK,CAACE,IAAI,EAAE;IACd,OAAOF,KAAK,CAACG,MAAM,CAACC,OAAO;EAC7B;EAEA,OAAOJ,KAAK,CAACG,MAAM,CAACE,MAAM;AAC5B,CAAC;AAED,MAAMC,wBAAwB,GAAGA,CAAC;EAChCN,KAAK;EACLO;AAIF,CAAC,KAAK;EACJ,IAAIA,oBAAoB,EAAE;IACxB,OAAOA,oBAAoB;EAC7B;EAEA,IAAIP,KAAK,CAACE,IAAI,EAAE;IACd,OAAOF,KAAK,CAACG,MAAM,CAACK,gBAAgB;EACtC;EAEA,IAAIR,KAAK,CAACS,IAAI,EAAE;IACd,OAAOX,KAAK,CAACE,KAAK,CAACG,MAAM,CAACO,IAAI,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,MAAM,CAAC,CAAC;EAC3D;EAEA,OAAOf,KAAK,CAACE,KAAK,CAACG,MAAM,CAACO,IAA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AACG,IAAI,CAAC,IAAI,CAAC,CAACN,GAAG,CAAC,CAAC,CAACC,MAAM,CAAC,CAAC;AACtD,CAAC;AAED,OAAO,MAAMe,2BAA2B,GAAGA,CAAC;EAC1C5B,KAAK;EACLgB,QAAQ;EACRf;AAKF,CAAC,KAAK;EACJ,MAAMc,YAAY,GAAGW,kBAAkB,CAAC;IAAE1B,KAAK;IAAEgB,QAAQ;IAAEf;EAAY,CAAC,CAAC;EACzE,OAAO;IACLc,YAAY;IACZS,WAAW,EAAEG,iBAAiB,CAAC;MAC7B3B,KAAK;MACLe,YAAY;MACZC;IACF,CAAC;EACH,CAAC;AACH,CAAC","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}