import { t } from "@lingui/macro"; import { TemplateResult, html } from "lit"; import { customElement, property } from "lit/decorators.js"; import { until } from "lit/directives/until.js"; import { CoreApi, CoreUsersRecoveryEmailRetrieveRequest, StagesApi, User } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { Form } from "../../elements/forms/Form"; import "../../elements/forms/HorizontalFormElement"; @customElement("ak-user-reset-email-form") export class UserResetEmailForm extends Form { @property({ attribute: false }) user!: User; getSuccessMessage(): string { return t`Successfully sent email.`; } send = (data: CoreUsersRecoveryEmailRetrieveRequest): Promise => { data.id = this.user.pk; return new CoreApi(DEFAULT_CONFIG).coreUsersRecoveryEmailRetrieve(data); }; renderForm(): TemplateResult { return html`
`; } }