import { DEFAULT_CONFIG } from "@goauthentik/web/api/Config"; import "@goauthentik/web/elements/forms/ProxyForm"; import "@goauthentik/web/elements/wizard/FormWizardPage"; import "@goauthentik/web/elements/wizard/Wizard"; import { WizardPage } from "@goauthentik/web/elements/wizard/WizardPage"; import "@goauthentik/web/pages/sources/ldap/LDAPSourceForm"; import "@goauthentik/web/pages/sources/oauth/OAuthSourceForm"; import "@goauthentik/web/pages/sources/plex/PlexSourceForm"; import "@goauthentik/web/pages/sources/saml/SAMLSourceForm"; import { t } from "@lingui/macro"; import { customElement } from "@lit/reactive-element/decorators/custom-element.js"; import { CSSResult, LitElement, TemplateResult, html } from "lit"; import { property } from "lit/decorators.js"; import AKGlobal from "@goauthentik/web/authentik.css"; import PFButton from "@patternfly/patternfly/components/Button/button.css"; import PFForm from "@patternfly/patternfly/components/Form/form.css"; import PFRadio from "@patternfly/patternfly/components/Radio/radio.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; import { SourcesApi, TypeCreate } from "@goauthentik/api"; @customElement("ak-source-wizard-initial") export class InitialSourceWizardPage extends WizardPage { @property({ attribute: false }) sourceTypes: TypeCreate[] = []; static get styles(): CSSResult[] { return [PFBase, PFForm, PFButton, AKGlobal, PFRadio]; } sidebarLabel = () => t`Select type`; render(): TemplateResult { return html`
`; } } @customElement("ak-source-wizard") export class SourceWizard extends LitElement { static get styles(): CSSResult[] { return [PFBase, PFButton, AKGlobal, PFRadio]; } @property({ attribute: false }) sourceTypes: TypeCreate[] = []; firstUpdated(): void { new SourcesApi(DEFAULT_CONFIG).sourcesAllTypesList().then((types) => { this.sourceTypes = types; }); } render(): TemplateResult { return html`