import { t } from "@lingui/macro";
import { CSSResult, html, LitElement, TemplateResult } from "lit";
import { customElement, property } from "lit/decorators";
import PFButton from "@patternfly/patternfly/components/Button/button.css";
import PFBase from "@patternfly/patternfly/patternfly-base.css";
import { Provider } from "@goauthentik/api";
import "../../elements/Spinner";
import "../../elements/forms/ModalForm";
import "../../pages/applications/ApplicationForm";
@customElement("ak-provider-related-application")
export class RelatedApplicationButton extends LitElement {
static get styles(): CSSResult[] {
return [PFBase, PFButton];
}
@property({ attribute: false })
provider?: Provider;
render(): TemplateResult {
if (this.provider?.assignedApplicationSlug) {
return html`
${this.provider.assignedApplicationName}
`;
}
return html`
${t`Create`}
${t`Create Application`}
`;
}
}