import { t } from "@lingui/macro";
import { html, TemplateResult } from "lit";
import { customElement, property } from "lit/decorators";
import { EVENT_REFRESH } from "../../constants";
import "../LoadingOverlay";
import { ModalButton } from "../buttons/ModalButton";
import "../buttons/SpinnerButton";
import { Form } from "./Form";
@customElement("ak-forms-modal")
export class ModalForm extends ModalButton {
@property({ type: Boolean })
closeAfterSuccessfulSubmit = true;
@property({ type: Boolean })
showSubmitButton = true;
@property({ type: Boolean })
loading = false;
@property({ type: String })
cancelText = t`Cancel`;
confirm(): Promise {
const form = this.querySelector