import { PFSize } from "@goauthentik/common/enums.js"; import { AKElement } from "@goauthentik/elements/Base"; import "@goauthentik/elements/Spinner"; import { msg } from "@lit/localize"; import { CSSResult, TemplateResult, css, html } from "lit"; import { customElement, property } from "lit/decorators.js"; import PFEmptyState from "@patternfly/patternfly/components/EmptyState/empty-state.css"; import PFTitle from "@patternfly/patternfly/components/Title/title.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; @customElement("ak-empty-state") export class EmptyState extends AKElement { @property({ type: String }) icon = ""; @property({ type: Boolean }) loading = false; @property({ type: Boolean }) fullHeight = false; @property() header?: string; static get styles(): CSSResult[] { return [ PFBase, PFEmptyState, PFTitle, css` i.pf-c-empty-state__icon { height: var(--pf-global--icon--FontSize--2xl); line-height: var(--pf-global--icon--FontSize--2xl); } `, ]; } render(): TemplateResult { return html`
${this.loading ? html`
` : html``}

${this.loading && this.header === undefined ? msg("Loading") : this.header}

`; } } declare global { interface HTMLElementTagNameMap { "ak-empty-state": EmptyState; } }