{"version":3,"file":"context.mjs","names":[],"sources":["../src/context.ts"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { AutoFormContextType } from \"./types\";\n\nconst AutoFormContext = createContext<AutoFormContextType | null>(null);\n\nexport const AutoFormProvider = AutoFormContext.Provider;\n\nexport function useAutoForm() {\n  const context = useContext(AutoFormContext);\n  if (!context) {\n    throw new Error(\"useAutoForm must be used within an AutoFormProvider\");\n  }\n  return context;\n}\n"],"mappings":";;AAGA,MAAM,kBAAkB,cAA0C,IAAI;AAEtE,MAAa,mBAAmB,gBAAgB;AAEhD,SAAgB,cAAc;CAC5B,MAAM,UAAU,WAAW,eAAe;CAC1C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,qDAAqD;CAEvE,OAAO;AACT"}