import { CSSResult, LitElement, TemplateResult, css, html } from "lit"; import { customElement, property } from "lit/decorators.js"; import { ifDefined } from "lit/directives/if-defined.js"; import AKGlobal from "@goauthentik/web/authentik.css"; import PFCard from "@patternfly/patternfly/components/Card/card.css"; import PFFlex from "@patternfly/patternfly/layouts/Flex/flex.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; @customElement("ak-aggregate-card") export class AggregateCard extends LitElement { @property() icon?: string; @property() header?: string; @property() headerLink?: string; @property({ type: Boolean }) isCenter = true; static get styles(): CSSResult[] { return [PFBase, PFCard, PFFlex, AKGlobal].concat([ css` .pf-c-card.pf-c-card-aggregate { height: 100%; } .pf-c-card__header { flex-wrap: nowrap; } .center-value { font-size: var(--pf-global--icon--FontSize--lg); text-align: center; color: var(--pf-global--Color--100); } .subtext { font-size: var(--pf-global--FontSize--sm); } `, ]); } renderInner(): TemplateResult { return html``; } renderHeaderLink(): TemplateResult { return html`${this.headerLink ? html` ` : ""}`; } render(): TemplateResult { return html`
 ${this.header ? this.header : ""}
${this.renderHeaderLink()}
${this.renderInner()}
`; } }