{"version":3,"file":"Form.mjs","names":[],"sources":["../../../../../src/integrations/react-hook-form/Form/Form.tsx"],"sourcesContent":["import { Form as RhfForm } from \"@mittwald/flow-react-components/react-hook-form\";\nimport type { FormProps } from \"@mittwald/flow-react-components/react-hook-form\";\nimport type { FieldValues } from \"react-hook-form\";\nimport { createRemoteComponent } from \"@/lib/createRemoteComponent\";\nimport { RemoteRhfFormElement } from \"@mittwald/flow-remote-elements/react-hook-form\";\nexport { type RemoteRhfFormElement } from \"@mittwald/flow-remote-elements/react-hook-form\";\n\nconst BaseForm = createRemoteComponent(\"flr-rhf-form\", RemoteRhfFormElement, {\n  eventProps: {\n    onSubmit: { event: \"submit\" } as never,\n  },\n});\n\nexport const Form: typeof RhfForm = <F extends FieldValues>(\n  props: FormProps<F>,\n) => {\n  const { onSubmit, ...rest } = props;\n\n  return (\n    <RhfForm\n      {...rest}\n      onSubmit={onSubmit}\n      formComponent={(p) => <BaseForm onSubmit={onSubmit} {...p} />}\n    />\n  );\n};\n\nexport default Form;\n"],"mappings":";;;;;;;AAOA,IAAM,WAAW,sBAAsB,gBAAgB,sBAAsB,EAC3E,YAAY,EACV,UAAU,EAAE,OAAO,SAAS,EAC9B,EACF,CAAC;AAED,IAAa,UACX,UACG;CACH,MAAM,EAAE,UAAU,GAAG,SAAS;CAE9B,OACE,oBAAC,MAAD;EACE,GAAI;EACM;EACV,gBAAgB,MAAM,oBAAC,UAAD;GAAoB;GAAU,GAAI;EAAI,CAAA;CAC7D,CAAA;AAEL"}