{"version":3,"file":"Form.mjs","names":[],"sources":["../../../src/components/Form.tsx"],"sourcesContent":["\"use client\";\nimport { createRemoteComponent } from \"@/lib/createRemoteComponent\";\nimport { RemoteFormElement } from \"@mittwald/flow-remote-elements\";\nimport type { ComponentProps, FC } from \"react\";\nimport { startTransition } from \"react\";\nexport { type RemoteFormElement } from \"@mittwald/flow-remote-elements\";\n\nconst BaseForm = createRemoteComponent(\"flr-form\", RemoteFormElement, {\n  eventProps: {\n    onSubmit: { event: \"submit\" } as never,\n  },\n});\n\nexport const Form: FC<ComponentProps<typeof BaseForm>> = (props) => {\n  const { action, ...rest } = props;\n\n  const actionWithContext =\n    action && typeof action === \"function\"\n      ? (formData: FormData) => startTransition(() => action(formData))\n      : action;\n\n  return <BaseForm {...rest} action={actionWithContext} />;\n};\n"],"mappings":";;;;;;;;AAOA,IAAM,WAAW,sBAAsB,YAAY,mBAAmB,EACpE,YAAY,EACV,UAAU,EAAE,OAAO,SAAS,EAC9B,EACF,CAAC;AAED,IAAa,QAA6C,UAAU;CAClE,MAAM,EAAE,QAAQ,GAAG,SAAS;CAE5B,MAAM,oBACJ,UAAU,OAAO,WAAW,cACvB,aAAuB,sBAAsB,OAAO,QAAQ,CAAC,IAC9D;CAEN,OAAO,oBAAC,UAAD;EAAU,GAAI;EAAM,QAAQ;CAAoB,CAAA;AACzD"}