{"version":3,"file":"Form.mjs","names":[],"sources":["../../src/Form.ts"],"sourcesContent":["import { FlowRemoteElement } from \"@/lib/FlowRemoteElement\";\n\nexport type RemoteFormElementProps = {\n  id?: string;\n  action?: string | ((payload: FormData) => void | Promise<void>);\n  onSubmit?: (event: never) => void;\n} & Partial<Pick<HTMLFormElement, \"enctype\" | \"method\">>;\n\nexport class RemoteFormElement extends FlowRemoteElement<RemoteFormElementProps> {\n  static override get remoteEvents() {\n    return {\n      submit: {},\n    };\n  }\n\n  static override get remoteProperties() {\n    return {\n      id: {},\n      method: {},\n      enctype: {},\n      action: {},\n    };\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    \"flr-form\": InstanceType<typeof RemoteFormElement>;\n  }\n}\n\ncustomElements.define(\"flr-form\", RemoteFormElement);\n"],"mappings":";;AAQA,IAAa,oBAAb,cAAuC,kBAA0C;CAC/E,WAAoB,eAAe;EACjC,OAAO,EACL,QAAQ,CAAC,EACX;CACF;CAEA,WAAoB,mBAAmB;EACrC,OAAO;GACL,IAAI,CAAC;GACL,QAAQ,CAAC;GACT,SAAS,CAAC;GACV,QAAQ,CAAC;EACX;CACF;AACF;AAQA,eAAe,OAAO,YAAY,iBAAiB"}