{"version":3,"file":"RadioGroupContext.cjs","sources":["../../../../../src/components/ui/radio/RadioGroupContext.ts"],"sourcesContent":["import { createContext, useContext, type ChangeEventHandler } from 'react';\nimport type { SizeKey } from '../props';\n\nexport interface RadioGroupContextValue {\n  /** Name shared by every Radio in the group, so the browser enforces single selection. */\n  name?: string;\n  /** Size explicitly set on the group — the size default for its Radios; an explicit Radio size wins. */\n  size?: SizeKey;\n  /** Selected value when the group is controlled. */\n  value?: string;\n  /** Initially selected value when the group is uncontrolled. */\n  defaultValue?: string;\n  /** Called after the Radio's own onChange whenever a Radio in the group changes. */\n  onChange?: ChangeEventHandler<HTMLInputElement>;\n}\n\n/* Group state consumed by descendant Radios — a scalar context like LabelSizeContext, so mounting a RadioGroup never forks the theme graph. */\nexport const RadioGroupContext = createContext<RadioGroupContextValue | null>(null);\n\nexport function useRadioGroupContext(): RadioGroupContextValue | null {\n  return useContext(RadioGroupContext);\n}\n"],"names":["createContext","useContext"],"mappings":";;;;;AAiBO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoBA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAA6C,CAAA,CAAA,CAAA,CAAI,CAAA;AAE3E,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,oBAAA,CAAA,CAAA,CAAsD;AACpE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAOC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,CAAA;AACrC;;;"}