import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element"; import { Provider } from "../../api/Providers"; import { COMMON_STYLES } from "../../common/styles"; import "../../elements/buttons/ModalButton"; import "../../elements/buttons/SpinnerButton"; import { SpinnerSize } from "../../elements/Spinner"; import "./SAMLProviderViewPage"; import "./OAuth2ProviderViewPage"; import "./ProxyProviderViewPage"; @customElement("ak-provider-view") export class ProviderViewPage extends LitElement { @property({type: Number}) set providerID(value: number) { Provider.get(value).then((app) => (this.provider = app)); } @property({ attribute: false }) provider?: Provider; static get styles(): CSSResult[] { return COMMON_STYLES; } render(): TemplateResult { if (!this.provider) { return html`
Invalid provider type ${this.provider?.object_type}
`; } } }