import { RadioButtonProps } from "@lifesg/react-design-system/radio-button"; import type { IPopoverSchema, ITextSchema, ITypographySchema } from "../../elements"; import type { IInlineWrapperSchema } from "../../elements/wrapper"; import { TComponentOmitProps, TFrontendEngineFieldSchema } from "../../frontend-engine"; import { IBaseFieldSchema } from "../types"; export interface IRadioButtonOption { label: string | Record; value: string; disabled?: boolean | undefined; } export interface IRadioToggleOption extends IRadioButtonOption { children?: Record> | undefined; subLabel?: string | undefined; } export interface IImageButtonOption extends IRadioButtonOption { imgSrc?: string | undefined; } export type TRadioToggleLayoutType = "horizontal" | "vertical"; export type TBreakpoint = "mobile" | "tablet" | "desktop"; export type TResponsiveValue = T | { mobile?: T | undefined; tablet?: T | undefined; desktop?: T | undefined; }; export type TLayoutColumns = TResponsiveValue; export type TMinItemWidth = TResponsiveValue; interface IRadioButtonDefaultSchema extends IBaseFieldSchema<"radio", V>, TComponentOmitProps { options: IRadioButtonOption[]; customOptions?: { styleType: "default"; } | undefined; } export interface IRadioButtonToggleSchema extends IBaseFieldSchema<"radio", V>, TComponentOmitProps { options: IRadioToggleOption[]; allowDeselection?: boolean | undefined; customOptions: { styleType: "toggle"; indicator?: boolean | undefined; border?: boolean | undefined; layoutType?: TRadioToggleLayoutType | undefined; layoutColumns?: TLayoutColumns | undefined; minItemWidth?: TMinItemWidth | undefined; stretch?: boolean | undefined; }; } interface IRadioButtonImageButtonSchema extends IBaseFieldSchema<"radio", V>, TComponentOmitProps { options: IImageButtonOption[]; customOptions: { styleType: "image-button"; }; } export type TRadioButtonGroupSchema = IRadioButtonDefaultSchema | IRadioButtonToggleSchema | IRadioButtonImageButtonSchema; export {};