import type { Theme } from '@cleartrip/ct-design-theme'; import { TypographyColor, TypographyColorType } from '@cleartrip/ct-design-typography'; type RadioBorderStyle = { borderWidth: number; borderColor?: string; backgroundColor?: string; }; export const getBorderStyles = (theme: Theme, isSelected: boolean, isDisabled: boolean): RadioBorderStyle => { switch (true) { case isDisabled: { if (isSelected) { return { borderWidth: theme.border.width.xl, borderColor: theme.color.border.disabled, // @ts-ignore web only property cursor: 'not-allowed', }; } return { borderWidth: theme.border.width.sm, borderColor: theme.color.border.disabled, backgroundColor: theme.color.background.neutral, // @ts-ignore web only property cursor: 'not-allowed', }; } case isSelected: { return { borderWidth: theme.border.width.xl, borderColor: theme.color.border.primary, // @ts-ignore web only property cursor: 'pointer', }; } default: { return { borderWidth: theme.border.width.sm, borderColor: theme.color.border.defaultDark, backgroundColor: theme.color.background.neutral, // @ts-ignore web only property cursor: 'pointer', }; } } }; export const getLabelColor = (isDisabled: boolean): TypographyColorType => { if (isDisabled) { return TypographyColor.DISABLED; } return TypographyColor.PRIMARY; };